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

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


Just had this exact issue with Alpine Linux.

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


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.


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.