buildroot_initramfs/host/bin/riscv-nuclei-linux-gnu-gdb: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory
fanghuaqi opened this issue · 0 comments
fanghuaqi commented
先按照文档按照了需要的软件,参见README.md
通过如下命令可以查看缺少的库
然后执行如下命令
$ ls -l /lib/x86_64-linux-gnu/libgmp.so*
lrwxrwxrwx 1 root root 16 Feb 24 2020 /lib/x86_64-linux-gnu/libgmp.so -> libgmp.so.10.4.0
lrwxrwxrwx 1 root root 16 Feb 24 2020 /lib/x86_64-linux-gnu/libgmp.so.10 -> libgmp.so.10.4.0
-rw-r--r-- 1 root root 534880 Feb 24 2020 /lib/x86_64-linux-gnu/libgmp.so.10.4.0
# 手动创建一个软链接到新版本的libgmp.so上,需要root权限
$ sudo ln -s /lib/x86_64-linux-gnu/libgmp.so /lib/x86_64-linux-gnu/libgmp.so.3
如下是正常链接的结果
$ ldd work/evalsoc/buildroot_initramfs/host/bin/riscv-nuclei-linux-gnu-gdb
linux-vdso.so.1 (0x00007ffc69f18000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007ff4bc539000)
libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5 (0x00007ff4bc507000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff4bc501000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ff4bc4d3000)
libgmp.so.3 => /lib/x86_64-linux-gnu/libgmp.so.3 (0x00007ff4bc44f000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff4bc26b000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff4bc11c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff4bc101000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff4bc0de000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff4bbeec000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff4bc583000)