linux--error while loading shared libraries: libcrypt.so.2: cannot open shared object file: No such file or directory


在测试的过程中遇到了“

 

 

https://blog.csdn.net/dumeifang/article/details/2963223

上面的这个比较靠谱一些。

但是我目前的.so 文件都是在/usr/lib64.下,需要的文件可以在网上搜到,我的是在https://archlinux.pkgs.org/rolling/archlinux-core-x86_64/libxcrypt-4.4.17-1-x86_64.pkg.tar.zst.html

于是去host上:wget https://ftp5.gwdg.de/pub/linux/archlinux/core/os/x86_64/libxcrypt-4.4.17-1-x86_64.pkg.tar.zst,就可以啦,我是下在/root/opt/下的

j解压:$ tar -I zstd -xvf XXXX.tar.zst

解压后发现就在固定的位置了,有/root/opt/usr/lib 路径下:

在/etc/ld.so.conf中加入/root/opt/usr/lib这一行,保存之后,再运行:/sbin/ldconfig –v更新一下配置即可.

我这么做最后成功了。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM