Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Suppose I build library X from source and install it via make install. Suppose then that I install program Y via rpm. If program Y depends on library X, is there a way to make rpm see that I already have library X? Or am I pretty much stuck looking for a suitable rpm for library X (or packaging one up myself)?
Manually compiled libraries should work as well as any rpm provided alternative. However, you may occasionally need to edit one or more variables to make it work properly, especially when another library already provides the same functionality.
Anything you compile yourself is not known to the package manager, though, and takes manual removal and updating and obviously implies that you are yourself responsible for keeping track of any security issues related to the library in question .
Of course, you could also look into building your own rpm package from source if that looks inconvenient.
obviously its best to build a proper rpm for the dependency, but if you're in a hurry, you can always edit the spec file (that is, if you can get the SRPM for the package).
1) install rpmbuild
2) do an rpm2cpio foo.src.rpm |cpio -id
3) remove the BuildRequires line for the dependency lib
3) copy the spec to /usr/src/redhat/SPECS, the tar to /usr/src/redhat/SOURCES
4) change to /usr/src/redhat
5) run rpmbuild -bb SPECS/foo.spec
6) install the new rpm in /usr/src/redhat/RPMS
Excellent! Thank you all for the helpful tips! I will look into packaging my own rpms for locally compiled software. It looks like it might be a fairly involved process, though, so for the short term I might just have to live with side-by-side installations of multiple version of a few things. No big deal, as long as the number of those remains manageable....
building rpms can be either trivial or excruciating. Usually, if the package uses automake/autoconf/etc, the spec file can be trivial and its worth building the package... on the other hand if the package uses hard coded directories, custom/buggy build scripts, etc, its best to install from source.