Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

curl: (48) An unknown option was passed in to libcurl

This is really frustrating. I keep getting this error when trying to run a standard curl command:

curl --url https://install.meteor.com | sh
curl: (48) An unknown option was passed in to libcurl

Anyone know how to fix it?

like image 647
Zaheer Avatar asked Jul 26 '12 21:07

Zaheer


4 Answers

Just had this exact issue with Alpine Linux.

The fix was to install curl-dev in addition to curl.

like image 183
rix Avatar answered Dec 27 '22 00:12

rix


Most likely you have a newer curl that uses an older libcurl that doesn't know of one or more options curl tries to use.

curl -V will show this and ldd [path to curl] will show you all shared libraries curl uses.

like image 34
Daniel Stenberg Avatar answered Dec 27 '22 02:12

Daniel Stenberg


I've just run into this problem myself. A bit of cursory research led me to this bug tracker entry, but updating didn't do the trick. I recently built the newest version of libcurl from source, though, so I figured it must be something to do with the directory structure getting mixed up. I'm sure you're probably not in the exact same situation, but perhaps Mountain Lion introduced a similar enough error that the steps I took to fix the problem might be able to help.

First, run which curl to determine where the binary is being called from. Then make sure that location actually exists by running locate -r /curl$. If it doesn't (this was the issue in my case), try running curl using all of the full paths provided by locate, ignoring the obviously superfluous ones like python-pycurl.

Once you've found one that works, you can either create a symlink to it from the one which found, or else check to see whether removing the latter will allow the shell to find the correct one on its own. For me, the fix was as simple as removing /usr/local/bin/curl, causing which curl to correctly respond with /usr/bin/curl and curl itself to return to normal operation.

like image 27
andkerosine Avatar answered Dec 27 '22 01:12

andkerosine


If you just built your curl from source, run sudo ldconfig to fix it.

like image 45
Kevin Murda Avatar answered Dec 27 '22 01:12

Kevin Murda