Score:1

Library Won't Update

ng flag

I'm trying to update my libarchive library on CentOS 7. Currently, I have version 3.1.2. If I type the following command, here is the result:

# rpm -q libarchive
libarchive-3.1.2-10.el7_2.x86_64

I was able to find an .rpm file, online, which provides libarchive 3.5.2. I'd like to update to this newer version. So, I attempted to install the package by typing the following:

# rpm -i libarchive-3.5.2-1.el9.src.rpm
warning: user mockbuild does not exist -- using root
warning: group mock does not exist -- using root
warning: user mockbuild does not exist -- using root
warning: group mock does not exist -- using root
warning: user mockbuild does not exist -- using root
warning: group mock does not exist -- using root
warning: user mockbuild does not exist -- using root
warning: group mock does not exist -- using root

Even though it shows warnings, I would expect that it installed. After all, they're warnings, not errors. However, if I type the following command, it doesn't show that the package was installed.

# rpm -lq libarchive
/usr/lib64/libarchive.so.13
/usr/lib64/libarchive.so.13.1.2
/usr/share/doc/libarchive-3.1.2
/usr/share/doc/libarchive-3.1.2/COPYING
/usr/share/doc/libarchive-3.1.2/NEWS
/usr/share/doc/libarchive-3.1.2/README
/usr/share/man/man5/cpio.5.gz
/usr/share/man/man5/mtree.5.gz
/usr/share/man/man5/tar.5.gz

I've also tried compiling from source, based on a downloaded .tar file from the libarchive.org website. The procedure seems to go well, but I still only show the old, 3.1.2 version of libarchive when typing the rpm -lq libarchive command, or the rpm -q libarchive command.

So, how would I update this library? If it has been updated, why don't these commands show that it has been updated?

Thanks for your time.

Score:2
cm flag

The RPM you are trying to install is a SRPM (hence the .src in its filename) - it contains the sources for the package you want to upgrade.

You need to compile it first for your target system. Use mock to do that.

Take great care of not breaking other things if you introduce a newer version of a system lib provided by CentOS. Consider upgrading to EL8 (e.g. Rocky Linux, Alma Linux, or CentOS 8 Stream), you likely save yourself from headaches.

Score:0
cn flag

el9 tag in the version you found indicates RHEL 9. As of now in first quarter 2022, still early in its lifecycle, so that came from CentOS Stream 9 or RHEL 9 beta. If you use those operating systems this will be pre-installed. Or of course Fedora is far ahead in versions.

Generic build and install instructions do not use the rpm package manger. To keep the package management experience you expect, take source RPMs intended for RHEL (or Fedora) and rebuild them with the mock tool.

Even when you manage to build an rpm package, there is the question of making it coexist. Important system packages depend on libarchive. And replacing a package from baseos is not something to do lightly. Definitely test this on a not important system first.

Score:0
ng flag

Ultimately, I've decided to take the advice that both of you have given. I've decided not to update the library.

I was trying to update the library so that I could install another piece of software -- OpenCoarrays.

Fortunately, I was able to install OpenCoarrays by use of an installation script, which was provided to me. The script worked, and the program has been installed. For this reason, I no longer need to update this library.

Thank you for taking the time to provide your input. You've both been very helpful.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.