LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2006, 06:42 PM   #1
leontini
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Fedora Core 8-10
Posts: 61

Rep: Reputation: 15
How to change where rpm looks for library linking


Hello all,

I am currently having some problems installing mp3 support for xmms on FC4. I have the rpm xmms-mp3-1.2.10-16.i386.rpm, but trying to install I get the following failed dependencies:

error: Failed dependencies:
xmms is needed by xmms-mp3-1.2.10-16.i386
libxmms.so.1 is needed by xmms-mp3-1.2.10-16.i386

However, I am fairly certain I have both of these files (I definitely have xmms!), as a quick locate showed that both of these files are in the following locations:

/usr/local/lib/libxmms.so.1
/usr/share/xmms

So, my problem seems to be getting rpm to "look" in these locations to find the files it requires. Is it possible to do this? A quick scan of the man page didn't seem to offer much (that doesn't mean it's not there, just that I don't know what to look for).

Any help is greatly appreciated,
 
Old 03-16-2006, 09:24 PM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
This is a fairly common problem. The easiest way to deal with it is just to symlink from the directory the app is looking in for the library to the library.

Most probably, xmms is looking in /usr/lib while your physical lib is in /usr/local/lib.

So, as root, you cd into /usr/lib and do an ln -s /usr/local/lib/libxmms.so.1 libxmms.so.1

And that will fix you up.

Beyond that, if it is a failed dependency on an rpm install, you should force the installation, requiring it to install regardless of dependencies. There are files called .pc files (look, for instance, in /usr/local/lib/pkgconfig) which contain information about installed packages which is used by configure and by RPM installers. If configure or RPM look in one place (/usr/lib/pkgconfig, for instance) while the .pc file is in another place (/usr/local/lib/pkgconfig, for instance) then this is the kind of problem you have. Force the installation, and it will work.

You might also try symlinking the .pc files from one location to the other.
 
Old 03-17-2006, 12:39 AM   #3
leontini
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Fedora Core 8-10
Posts: 61

Original Poster
Rep: Reputation: 15
jiml8,

Thanks for your reply. I got everything working by using the --nodeps option with rpm, ie;

rpm -Uvh --nodeps xmms-mp3-1.2.10-16.i386.rpm

xmms is now happily playing mp3s (although I prefer to use ogg, a lot of web radio uses mp3 streaming).

Still, is this a fix that will work "all" the time, or was I just lucky? I tried the symlink option, but that didn't change anything. Is there a way to find out where rpm looks, rather than assuming it checks /usr/lib? Although I got my original problem fixed, I don't feel like we have resolved the issue. Any input from anyone would be great.

Thanks,
 
Old 03-17-2006, 08:47 AM   #4
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Actually, more than likely the symlink did fix you up, but you still had to do the nodeps because the relevant .rc files are not where your RPM expected them, hence the dependency failure. Providing the symlink enabled xmms to find the libraries it needed, even though the particular compile started by looking in the wrong place.

Also, I did not specifically tell you to use rpm --nodeps because I was unsure what packaging program you were using in your distro.

Package installation is the single weakest point of Linux, and you have just seen why. Different compiles and different distros will put the same information in different places, and Linux is not good at finding all those possible places in a consistent fashion.

Before opting for a nodeps installation, you need to be certain that the dependency really is satisfied, regardless of what the package manager thinks, and then you need to make sure that the necessary libraries are symlinked to where they are needed; the dependency failure can be taken as a fairly good indicator that the package will refuse to run when installed unless you take this step.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking with a library stonehurstX11 Linux - Newbie 4 01-04-2006 04:07 PM
library linking question. shaggz Linux - General 1 04-25-2004 11:22 PM
linking own library bobby2k3 Programming 2 10-20-2003 10:36 AM
Help Linking Library!! Please!! Musikolo Linux - Software 1 07-24-2003 03:16 PM
linking library simonissa Linux - Software 2 05-21-2003 09:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:11 PM.

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