EDA365电子论坛网
标题: linux 缺少动态连接库.so--cannot open shared object file: No such file or dire... [打印本页]
作者: uperrua 时间: 2019-8-9 08:30
标题: linux 缺少动态连接库.so--cannot open shared object file: No such file or dire...
error while loading shared libraries的解決方法0 t a$ r* p6 g+ n6 T9 H
4 r) I# ^8 ]- i/ g3 B3 q# W
执行行程式時,如此遇到像下列這種錯誤: , ?# Z0 q* c8 D! e, c5 C
8 o* Y6 s" J/ m# Y./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory/ A/ q1 [1 j, \$ K0 m" l% O7 g
) u, J8 y4 s' c8 _) n( @
那就表示系統不知道xxx.so 放在哪個目錄下。
- \) Q& ~1 l" _這個時候就要在/etc/ld.so.conf中加入xxx.so所在的目錄。
* A& P' P" \; c* J. g; b/ O+ z
* U, g7 u1 S+ I& q& j一般而言,有很多so檔會在/usr/local/lib這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。
+ Z- `) A* k, j$ S3 a7 {
. F! w0 c. p9 x+ K, t- A* ?或者加入一行xx.so所在的绝对路径,如/usr/local/log4cxx/lib/ 也行。
5 |7 x- w+ Z# K @ A, e
% y2 P2 u+ i+ M
% e( s* J# ?% p7 Z; m
$ ]: J! c9 z9 j& G' m
作者: wu68aq 时间: 2019-8-9 17:57
看看楼主说的什么
| 欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/) |
Powered by Discuz! X3.2 |