ubuntu 运行可执行文件时出现问题:error while loading shared libraries
2016-10-23 21:28
831 查看
环境:ubuntu16.04 64位
问题描述:
运行别人/别的电脑编译好的可执行文件时,终端输出错误:
解决方案:
类似error while loading shared libraries: xxx: cannot open shared object file: No such file or directory的错误都可参考如下方法:
1、首先使用如下命令查找该库(以libstdc++.so.6为例)所在的包
找到后终端会返回结果,有很多就不全列出了,左边是包,右边是库
2、安装需要的
特别注意:
运行命令apt-file search xxx时可能出现如下错误:
这时需要根据提示执行
问题描述:
运行别人/别的电脑编译好的可执行文件时,终端输出错误:
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
解决方案:
类似error while loading shared libraries: xxx: cannot open shared object file: No such file or directory的错误都可参考如下方法:
1、首先使用如下命令查找该库(以libstdc++.so.6为例)所在的包
<span style="font-size:12px;">$ apt-file search libstdc++.so.6</span>
找到后终端会返回结果,有很多就不全列出了,左边是包,右边是库
gcc-snapshot: /usr/lib/gcc-snapshot/lib/debug/libstdc++.so.6 gcc-snapshot: /usr/lib/gcc-snapshot/lib/debug/libstdc++.so.6.0.22 gcc-snapshot: /usr/lib/gcc-snapshot/lib/libstdc++.so.6 gcc-snapshot: /usr/lib/gcc-snapshot/lib/libstdc++.so.6.0.22 gcc-snapshot: /usr/lib/gcc-snapshot/lib/libstdc++.so.6.0.22-gdb.py ...
2、安装需要的
$ sudo apt-get install gcc-snapshot
特别注意:
运行命令apt-file search xxx时可能出现如下错误:
The program 'apt-file' is currently not installed. You can install it by typing: sudo apt install apt-file
这时需要根据提示执行
$ sudo apt install apt-file $ apt-file update即可。
相关文章推荐
- 针对Ubuntu下运行可执行文件出现的error while loading shared libraries: xxx.so的解决办法
- Liunx 运行用 Intel MKL 库文件的程序出错 “error while loading shared libraries libmkl_intel.so” 解决办法
- ubuntu14.04的error while loading shared libraries: libz.so.1问题
- ubuntu14.04的error while loading shared libraries: libz.so.1问题
- ubuntu运行genymotion出错 error while loading shared libraries: libgstapp-0.10.so.0: cannot open shared
- 乱删rpm导致再次安装包时出现 error while loading shared libraries: libgcc_s.so.1问题
- ubuntu14.04的error while loading shared libraries: libz.so.1问题
- 运行so文件时,出现error while loading shared libraries: libjvm.so: cannot open shared object file...
- ubuntu14.04的error while loading shared libraries: libz.so.1问题
- ubuntu编译android出现error while loading shared libraries: libstdc++.so.6: cannot open shared objec的解决方法
- 运行roscore时出现error while loading shared libraries:libroscpp.so
- Ubuntu共享库问题[gtest]_error while loading shared libraries: libgtest.so.0: cannot open shared object file: No such file or director
- ubuntu下安装andt出现error while loading shared libraries: libncurses.so.5: cannot open shared object file
- ubuntu14.04的error while loading shared libraries: libz.so.1问题
- ubuntu14.04的error while loading shared libraries: libz.so.1问题
- ubuntu下运行genymotion: error while loading shared libraries: libgstapp-0.10.so.0: cannot open shared
- linux下调用oracle OCI时出现的问题 error while loading shared libraries: libclntsh.so.10.1: cannot open shared
- Ubuntu共享库问题[gtest]_error while loading shared libraries: libgtest.so.0: cannot open shared object fi
- ubuntu 软件安装问题- 包依赖不对(error while loading shared libraries)
- Centos 7 使用Ecplise开发Android出现 error while loading shared libraries: libz.so.1 的问题