Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This 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.


  Search this Thread
Old 10-17-2008, 07:52 AM   #1
LQ Newbie
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Rep: Reputation: 15
Will RPM play nice with locally built packages?

Hi all,

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)?

Old 10-18-2008, 01:55 AM   #2
Registered: Sep 2007
Location: Shetland, UK
Distribution: Slackware, Mandrake, LFS
Posts: 59

Rep: Reputation: 16
if you look at, amongst others, you will find instructions for building rpms. Most source packages that I have looked at have a spec file for building the rpm package.

There are slightly more detailed instructions at

Of course, the ultimate reference is

Hope this helps
Old 10-18-2008, 02:12 AM   #3
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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.
Old 10-18-2008, 06:04 AM   #4
Registered: Mar 2008
Posts: 183

Rep: Reputation: 31
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
Old 10-20-2008, 04:04 AM   #5
LQ Newbie
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Original Poster
Rep: Reputation: 15
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....
Old 10-20-2008, 06:27 AM   #6
Registered: Mar 2008
Posts: 183

Rep: Reputation: 31
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Locally provided packages iotc247 Debian 1 06-11-2006 07:41 AM
Gentoo 2006 livecd installed,how do i emerge packages locally deepclutch Linux - Newbie 3 04-18-2006 10:39 AM
Does DELL play nice with SuSE ccin1492 SUSE / openSUSE 10 04-16-2006 09:05 PM
X11R6.9.0 Won't Play Nice pkozub Linux - Software 2 01-22-2006 12:45 AM
built kernel locally...need to install to a remote machine. how? ARCHIGAMER Linux - General 1 04-10-2005 03:52 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration