Reputation: 155
I'm facing this issue in my Ubuntu 20.04.2 LTS (fossa-charmander-14 X60). I've bought new DELL Latitude 5420. When I type the command "curl" this error shows up.
curl: symbol lookup error: curl: undefined symbol: curl_url_cleanup
parveen@eagle:~$ sudo apt install curl
[sudo] password for parveen:
Reading package lists... Done
Building dependency tree
Reading state information... Done
curl is already the newest version (7.68.0-1ubuntu2.7).
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
It says I already have curl, but I think it's not properly linked. When I type "man curl" it shows all manual docs about curl. But it's not working, please help me guys.
Upvotes: 6
Views: 27014
Reputation: 349
here's my answer:
1- first remove current curl package
sudo apt purge curl
2- install curl using snap
sudo snap install curl
3- remove any older curl files
sudo rm -rf /usr/local/bin/curl*
4- link snap curl
type curl
#curl is hashed (/snap/bin/curl)
hash -d curl
Upvotes: 5
Reputation: 1937
On Alpine it is just needed to run apk upgrade
before the install.
Upvotes: 0
Reputation: 51
I'm using Ubuntu 20.04.2, Dell Latitude 3410. I was getting the following error.
~> curl
curl: symbol lookup error: curl: undefined symbol: curl_url_set, version CURL_OPENSSL_4
I reinstalled curl with snap and it solved my problem.
~> sudo apt remove curl
~> sudo snap install curl
I also had a curl image with docker if necessary.
~> docker run curlimages/curl google.com
Upvotes: 1
Reputation: 1331
I found a different solution for this problem. I did the following:
1st - find out where was the dependency of curl to libcurl. For some reason there is an issue with this link.
sudo ldd $(which curl) | grep libcurl
The output pointed to a link at the following location:
/usr/local/lib/libcurl.so.4
Then I used the command:
sudo apt-get purge curl
After purging curl, I checked to see if that file was there, and it was there indeed. So I did the following:
sudo rm /usr/local/lib/libcurl.so.4
(or the path that you got previously)
And than I reinstalled curl with the following commando:
sudo apt-get install curl
And everything started working afterwards!!!
After installing other packages the problem came back and I had to repeat the process. So it is not a very stable solution. Apparently the file that I deleted was created back again. I am still looking for a permanent solution.
Upvotes: 8
Reputation: 155
I found a solution. First I used this command sudo rm -rf /usr/local/bin/curl*
to remove curl from this location. Then if I type curl it shows me the error bash: /usr/local/bin/curl: No such file or directory
. Then I used type curl
which gave me the output curl is hashed (/snap/bin/curl)
. Then I used hash -d curl
, after this my curl started working.
Comments from this answer really helped.
Upvotes: 5