r/linuxfromscratch • u/DriftCheburek • May 13 '26
about /lib64 and /lib
Why /usr/lib64 is separate dir from /usr/lib? Like, if it was a symlink to it then it will be no problem at all to install libs in /usr/lib, just, for example, pkgconfig files would be pointing to ${prefix}/lib64 instead. Are there any drawbacks from doing this?
8
Upvotes
3
u/codeasm May 13 '26 edited May 13 '26
I dunno why nobody checked, but LFS makes a note about this, it should not excist on your system. If it does, something during the compilation of lfs gone wrong or a seberate (blfs?) package was misconfigured
Read the note below the page https://linuxfromscratch.org/lfs/view/stable-systemd/chapter04/creatingminlayout.html
Only /lib64, no symlink, no normal folder in /usr/lib64 And this page also shows how /lib actually is symlinked to /usr/lib
3
u/Delta-Azura May 13 '26
I guess some soft have an hardcoded /lib64. It’s mainly for compatibility
3
u/TroubleDeep4753 May 13 '26 edited May 15 '26
Iirc it is for ld-linux.so, it needs to be there by FHS. Other than that, there are no files, other libraries are located in /lib
3
u/[deleted] May 13 '26
[removed] — view removed comment