LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-14-2004, 03:13 AM   #1
doxxan
Member
 
Registered: Oct 2003
Location: Västerås, Sweden
Distribution: Gentoo, Slackware
Posts: 35

Rep: Reputation: 15
/usr/lib and /usr/local/lib


Hi.
I had some problems compiling pango and gtk+ when I noticed that /usr/lib had symlinks to older libraries. I also noticed that the new symlinks were in /usr/local/lib, although it seems that libs should be installed in /usr/lib. So, I moved everything from /usr/local/lib to /usr/lib/, and simply symlinked /usr/local/lib to /usr/lib. I just wonder, is this correct? Why is there two separate lib dirs? Will something break in the future for doing this? System seems to work as of yet though.

Appreciate any feedback,
Doxxan
 
Old 06-14-2004, 03:32 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,561

Rep: Reputation: 124Reputation: 124
The /etc/ld.so.conf file main interest is to avoid symlink /whatever/lib/dir to /usr/lib
just put the path of /whatever/lib/dir in /etc/ld.so.conf and then, do ldconfig to take in account the changes, after that all programs find the correct libraries needed.
 
Old 06-14-2004, 03:56 AM   #3
doxxan
Member
 
Registered: Oct 2003
Location: Västerås, Sweden
Distribution: Gentoo, Slackware
Posts: 35

Original Poster
Rep: Reputation: 15
tnx alot keefaz, I'll have a look at ld.so.conf
 
Old 06-14-2004, 12:33 PM   #4
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 33
Re: /usr/lib and /usr/local/lib

Quote:
Originally posted by doxxan
Hi.
I had some problems compiling pango and gtk+ when I noticed that /usr/lib had symlinks to older libraries. I also noticed that the new symlinks were in /usr/local/lib, although it seems that libs should be installed in /usr/lib. So, I moved everything from /usr/local/lib to /usr/lib/, and simply symlinked /usr/local/lib to /usr/lib. I just wonder, is this correct? Why is there two separate lib dirs? Will something break in the future for doing this? System seems to work as of yet though.

Appreciate any feedback,
Doxxan
If you compiled pango and gtk+, you most likely didn't specify a "--prefix=" path. The default path for a lot of packages is "/usr/local"....................The official Slackware packages mostly use "--prefix=/usr", so if you have any of the official packages installed, you will see libs in both places............I would recommend removing the old packages to avoid possible conflicts..................

And there are more than two locations for libs, depending on the packages installed.................X and KDE, for example, have their own lib directories, which is where the /etc/ld.so.conf file keefaz mentioned comes into play...........ld.so.conf is for lib paths other than the two defaults of ".usr/lib" and "/usr/local/lib" (these two don't need to be entered in ld.so.conf)..............

And don't move anyhthing around.................now when you try to remove some packages, they won't be able to find the libs you moved, which will remain on your system and you will have to manually remove them.............To find out what goes where, you will need to look in /var/log/packages/<package_name> and /var/log/scripts/<package_name> (for symlinks) to find out what goes where............And if you already removed any packages after moving those libs, then you will need to look in /var/log/removed_packages and /var/log/removed_scripts to find out what was not removed that was supposed to get removed...........

HTH


PS: The main reason for symlinks for libs is to avoid using versions in the lib names...........

Last edited by thegeekster; 06-14-2004 at 12:37 PM.
 
Old 06-14-2004, 04:25 PM   #5
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware-current
Posts: 1,244

Rep: Reputation: 47
If you are going to install from source a package that is already installed, you should removepkg the old one. I would also recommend using an app such as checkinstall to install it rather than just make install it. That way you will be able to remove the newly installed package when the time comes to upgrade it again.
 
Old 06-15-2004, 12:58 AM   #6
doxxan
Member
 
Registered: Oct 2003
Location: Västerås, Sweden
Distribution: Gentoo, Slackware
Posts: 35

Original Poster
Rep: Reputation: 15
tnx for all the replies.

I've tried checkinstall in the past, and had trouble with it. But, I'll give it another go.

tnx alot guys ,
Doxxan
 
  


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
Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/local/lib/libaprutil-0.so. bijuhpd Linux - Newbie 1 10-30-2005 05:07 PM
including usr/local/lib directory Quest101 Linux - Software 3 01-01-2005 04:13 PM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 09:21 AM
no php.ini file under /usr/local/lib/ !! jogurt666 Linux - Software 1 12-16-2003 12:06 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration