error while loading shared libraries: libnsl.so.2: cannot open shared object file: No such
程序员文章站
2024-02-21 23:25:40
...
运行一个小程序的时候,报错:
./main: error while loading shared libraries: libnsl.so.2: cannot open shared object file: No such file or directory
网上的教程都是centos用yum install libnsl
解决的。
但是ubuntu 18.04直接sudo apt-get install libnsl
无法解决
废了一番功夫,源码安装了libnsl,解决了。
git clone https://github.com/thkukuk/libnsl.git
cd libnsl
./autogen.sh
./configure
make
sudo make install
可能运行autogen.sh时候会出现Press Return to acknowledge the previous four paragraphs.
这个时候按下回车就好。他就会自动生成configure、makefile等文件。
我这里没有遇到别的问题,如果有问题,可以去github看issue的解决方法。
上一篇: mac重启,开启apache时报错~~~镜像没有找到
下一篇: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such
推荐阅读
-
error while loading shared libraries: libnsl.so.2: cannot open shared object file: No such
-
error while loading shared libraries: libcudart.so.9.0: cannot open shared object file: No such file
-
Linux error while loading shared libraries: cannot open shared object file: No such file or director
-
error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such
-
error while loading shared libraries: librediscluster.so..: cannot open shared object file: No such
-
error while loading shared libraries: libfslio.so: cannot open shared object file: No such file
-
error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such
-
解决启动MongoDB错误:error while loading shared libraries: libstdc++.so.6:cannot open shared object file:
-
解决error while loading shared libraries: libXXX.so.X: cannot open shared object file: No such file
-
error while loading shared libraries: xxx: cannot open shared object file: No such file or directory