Debian git 错误:未定义符号:__gmpn_cnd_add_n

Debian git 错误:未定义符号:__gmpn_cnd_add_n

$ sudo apt-get install git

$ git clone sth

克隆到“a-folder”... git-remote-https:符号查找错误:/usr/lib/x86_64-linux-gnu/libhogweed.so.2:未定义符号:__gmpn_cnd_add_n

这个帖子告诉我删除/usr/local/lib/libgmp.so.10。我这样做了,它有效,但时不时地提示相同的错误(自从重新启动以来?)

我认为删除文件并不能真正解决问题。有更可靠的解决方案吗?

$ ldd /usr/lib/x86_64-linux-gnu/libhogweed.so.2

linux-vdso.so.1 (0x00007ffda9b27000)    libnettle.so.4 =>
/usr/lib/x86_64-linux-gnu/libnettle.so.4 (0x00007f4f7946e000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10
(0x00007f4f791eb000)    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
(0x00007f4f78e40000)    /lib64/ld-linux-x86-64.so.2 (0x00007f4f798cf000)


$ ldd /usr/lib/git-core/git-remote-https

linux-vdso.so.1 (0x00007ffc50ded000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fa0a491c000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fa0a4701000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fa0a44ea000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa0a42cd000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa0a40c5000)
libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007fa0a3e58000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fa0a3c2f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa0a3884000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa0a4b8a000)
libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007fa0a3650000)
librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007fa0a3432000)
libssh2.so.1 => /usr/lib/x86_64-linux-gnu/libssh2.so.1 (0x00007fa0a3209000)
libnettle.so.4 => /usr/lib/x86_64-linux-gnu/libnettle.so.4 (0x00007fa0a2fd7000)
libgnutls-deb0.so.28 => /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28 (0x00007fa0a2cb8000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fa0a2a6d000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fa0a2799000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fa0a2568000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fa0a2364000)
liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007fa0a2155000)
libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007fa0a1f03000)
libhogweed.so.2 => /usr/lib/x86_64-linux-gnu/libhogweed.so.2 (0x00007fa0a1cd4000)
libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x00007fa0a1a68000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fa0a1786000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fa0a1540000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fa0a132c000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fa0a1120000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa0a0f1c000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fa0a0d18000)
libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007fa0a0afc000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fa0a08ea000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fa0a06e2000)

Parallels Desktop 上的 Debian 8.4

答案1

您需要完全删除本地libgmp

rm /usr/local/lib/libgmp.so*

以后就没必要跑了ldconfigldconfig确保存在适当的符号链接;libgmp.so.10是具有该soname的最新库的符号链接(ls -l /usr/local/lib/libgmp.so*在删除文件之前运行以了解我的意思)。之前您删除了该符号链接,但运行ldconfig将恢复它......

相关内容