curl:(48)未知的选项被传递给libcurl [英] curl: (48) An unknown option was passed in to libcurl
问题描述
这真的令人沮丧。在尝试运行标准curl命令时,我始终遇到此错误:
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
任何人都知道修复它?
推荐答案
我刚刚遇到这个问题。有些粗略的研究使我得到了此错误跟踪器条目,但更新没有做的伎俩。我最近从源代码构建了 libcurl
的最新版本,所以我想这必然是与目录结构混淆起来的。我相信你可能不是在完全相同的情况,但也许山狮介绍了一个类似的足够的错误,我采取了解决这个问题的步骤可能能够帮助。
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.
首先,运行 which curl
以确定从中调用二进制文件的位置。然后通过运行 locate -r / curl $
确保该位置实际存在。如果没有(这是我的情况下的问题),尝试使用提供的所有完整路径运行
,忽略明显多余的像 curl
> python-pycurl
。
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
.
,您可以从发现的中创建一个符号链接,否则检查是否删除后者将允许shell自己找到正确的。对我来说,修复就像删除
/ usr / local / bin / curl
一样简单,导致 which curl
以 / usr / bin / curl
和 curl
本身回应以返回正常操作。
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.
这篇关于curl:(48)未知的选项被传递给libcurl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!