Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-14-2004, 03:13 AM
|
#1
|
Member
Registered: Oct 2003
Location: Västerås, Sweden
Distribution: Gentoo, Slackware
Posts: 35
Rep:
|
/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
|
|
|
06-14-2004, 03:32 AM
|
#2
|
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,797
|
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.
|
|
|
06-14-2004, 03:56 AM
|
#3
|
Member
Registered: Oct 2003
Location: Västerås, Sweden
Distribution: Gentoo, Slackware
Posts: 35
Original Poster
Rep:
|
tnx alot keefaz, I'll have a look at ld.so.conf 
|
|
|
06-14-2004, 12:33 PM
|
#4
|
Member
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513
Rep:
|
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.
|
|
|
06-14-2004, 04:25 PM
|
#5
|
Senior Member
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,273
Rep:
|
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.
|
|
|
06-15-2004, 12:58 AM
|
#6
|
Member
Registered: Oct 2003
Location: Västerås, Sweden
Distribution: Gentoo, Slackware
Posts: 35
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 03:09 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|