我在运行 Ubuntu 20.04 的笔记本电脑上安装 curl 时遇到问题。
我只是跑
sudo apt install curl
一切似乎都有效:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/162 kB of archives.
After this operation, 412 kB of additional disk space will be used.
Selecting previously unselected package curl.
(Reading database ... 245012 files and directories currently installed.)
Preparing to unpack .../curl_7.68.0-1ubuntu2.11_amd64.deb ...
Unpacking curl (7.68.0-1ubuntu2.11) ...
Setting up curl (7.68.0-1ubuntu2.11) ...
Processing triggers for man-db (2.9.1-1) ...
但是当我运行任何与 curl 相关的东西(例如curl version
)时,我收到消息
curl: symbol lookup error: curl: undefined symbol: curl_url_set, version CURL_OPENSSL_4
我已经尝试了一些建议,例如https://stackoverflow.com/questions/69255382/curl-symbol-lookup-error-curl-undefined-symbol-curl-url-cleanup
如果有帮助的话,以下是上述问题中提出的一些输出:
rodrigo@rodrigo-ThinkPad-T430s:~$ which curl
/usr/bin/curl
rodrigo@rodrigo-ThinkPad-T430s:~$ echo $PATH
/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/rodrigo/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
rodrigo@rodrigo-ThinkPad-T430s:~$ alias curl
bash: alias: curl: not found
在之前的一个问题之后,我被建议遵循这个: Ubuntu 20.04-Curl:符号查找错误
跑步ln -s /bin/curl /usr/bin/curl
让我回归ln: failed to create symbolic link '/usr/bin/curl': File exists.
以下是上述问题的一些输出:
rodrigo@rodrigo-ThinkPad-T430s:~$ sudo ldd $(which curl) | grep libcurl
libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x00007f7120478000)
rodrigo@rodrigo-ThinkPad-T430s:~$ ls -ltr
/usr/local/lib/libcurl* -rwxrw-rw- 1 root root 518600 mai 17 00:24 /usr/local/lib/libcurl.so.4.5.0 lrwxrwxrwx 1 root root 16 mai 17 10:32 /usr/local/lib/libcurl.so.4 -> libcurl.so.4.5.0