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.
–
–
–
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.
–
–
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!!!
Note: Problem returns after installing certain packages
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.
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
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.