我正在开发一个项目,该项目需要构建多个cURL版本,因此我从cURL的Github存储库中克隆了它们。我正在使用Ubuntu 14.04。
根据说明,我会执行以下操作:
./buildconf
./configure
make
前两个命令成功结束,make命令给了我一些错误:
CCLD curl
../lib/.libs/libcurl.so: undefined reference to `ldap_msgtype@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ber_free@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_init_fd@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_abandon_ext@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_get_option@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_get_dn_ber@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_memfree@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_msgfree@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_set_option@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_search_ext@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_free_urldesc@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ber_sockbuf_add_io@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_url_parse@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_sasl_bind@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_result@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_err2string@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_unbind_ext@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_parse_result@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ber_memfree@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_get_attribute_ber@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_first_message@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_pvt_url_scheme2proto@OPENLDAP_2.4_2'
../lib/.libs/libcurl.so: undefined reference to `ldap_next_message@OPENLDAP_2.4_2'
collect2: error: ld returned 1 exit status
make[2]: *** [curl] Error 1
make[2]: Leaving directory `/home/user/Desktop/curl/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/Desktop/curl/src'
make: *** [all-recursive] Error 1
我不知道该如何解决。我唯一想到的是我有两个版本的cURL,并且一段时间前我遵循以下答复时,我可能未对齐某些内容:https://stackoverflow.com/a/38896967/6912352
目前是这种情况:
curl -V
curl: /opt/PostgreSQL/9.6/lib/libcurl.so.4: no version information available (required by curl)
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.51.0 OpenSSL/1.0.2l zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
事实上,从那时起,我注意到第一个(/ opt / ...)是默认的,因为每次使用cURL或cURL时,我都会得到以下信息:
~/Desktop$ git clone --depth 1 https://github.com/openssl/openssl
Cloning into 'openssl'...
git-remote-https: /opt/PostgreSQL/9.6/lib/libldap_r-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4)
git-remote-https: /opt/PostgreSQL/9.6/lib/liblber-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4)
有人可以帮我弄清楚吗?谢谢。如果需要,请问我更多细节。