EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
error while loading shared libraries的解決方法
8 d( }, a! Q; A' {4 L, U3 x. W
8 k2 j& |2 D$ v' D执行行程式時,如此遇到像下列這種錯誤: ' e+ G( Y0 i1 w
- R9 ]! y5 E! Y
./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory/ L! z! k0 Y; J# a
3 J" o9 \8 K: N) h6 M
那就表示系統不知道xxx.so 放在哪個目錄下。 / A3 l; x: O8 a& V7 ^" G' l
這個時候就要在/etc/ld.so.conf中加入xxx.so所在的目錄。
5 i+ N8 k& M1 W" _4 W, g& H4 `' T6 i
一般而言,有很多so檔會在/usr/local/lib這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。; C' W+ C4 G& C1 u) \5 c
2 P+ ~8 s: m# D h或者加入一行xx.so所在的绝对路径,如/usr/local/log4cxx/lib/ 也行。& q; Z. z$ b6 `! ~/ }# N
3 \7 U7 H2 u( `2 @; g- Q9 Y
& T$ m V/ Q: }& A8 H
+ ]5 L) K% E1 F |