解决 Ubuntu “cannot open shared object file”

 

error while loading shared libraries:
libfreeradius-radius-2.1.10.so:
cannot open shared object file: No such file or directory

 

1,已经安装,但是没找到。快速修正,这将更新ldconfig的cache:

sudo /sbin/ldconfig -v

2,如果真的缺少包。首先去apt搜索,然后检查是否是软件需要的包,最后安装:

比如:

error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory

2.1 

 apt search libgobject

或者范围更大: apt search --names-only gobject

sudo apt install package_name

sudo /sbin/ldconfig -v 更新缓存

 

实际问题:

1,缺少so动态库:

ldd ./clang_x86_v8_arm/v8_context_snapshot_generator
    linux-gate.so.1 (0xf7f0d000)
    libffmpeg.so => /home/a/dev0/e9.2.1/src/out/ReleaseSym0/./clang_x86_v8_arm/libffmpeg.so (0xf3464000)
    libdl.so.2 => /lib32/libdl.so.2 (0xf3447000)
    libpthread.so.0 => /lib32/libpthread.so.0 (0xf3424000)
    librt.so.1 => /lib32/librt.so.1 (0xf3419000)
    libglib-2.0.so.0 => not found
    libm.so.6 => /lib32/libm.so.6 (0xf334c000)
    libX11.so.6 => not found
    libXcursor.so.1 => not found
    libgcc_s.so.1 => /lib32/libgcc_s.so.1 (0xf332d000)
    libc.so.6 => /lib32/libc.so.6 (0xf3143000)
    /lib/ld-linux.so.2 (0xf7f0e000)

找到后用 LD_LIBRARY_LIB 指定过去

 

参考:https://itsfoss.com/solve-open-shared-object-file-quick-tip/

posted @ 2021-03-17 11:47  Bigben  阅读(4015)  评论(0编辑  收藏  举报