macos - 在 mac os 的终端中运行 curl 会出现不兼容的库版本错误

标签 macos curl

在 mac 终端中运行 curl 命令时出现以下错误:

dyld: Library not loaded: /usr/local/Cellar/curl/7.58.0/lib/libcurl.4.dylib
  Referenced from: /usr/local/opt/curl/bin/curl
  Reason: Incompatible library version: curl requires version 10.0.0 or later, but libcurl.4.dylib provides version 9.0.0

我试图将路径添加到 bash_profile 它不起作用。如何使 curl 在 mac os 中工作?

最佳答案

我遵循了 Kamil.S 评论的建议,并采取了这些步骤来解决问题:

brew uninstall --force --ignore-dependencies curl
brew install curl

之后还必须重新安装依赖于 curl 的东西(以前从 brew uninstall --force curl 中列为依赖的东西):

brew uninstall --force git
brew install git

关于macos - 在 mac os 的终端中运行 curl 会出现不兼容的库版本错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48700310/

相关文章:

c++ - 什么会导致 "can' t 链接到共享库上的主可执行文件?

macos - 在 wkhtmltopdf 和 pdftk 中使用任何技巧来减小文件大小?

linux - 使用 CURL 抓取图像?

python - 尝试使用 Python 中的 REST API 在 Atlassian Bitbucket 中创建拉取请求

macos - 如何解决我在尝试将 C++ 与 Assembly 链接时遇到的这个链接器错误?

objective-c - 透明 NSWindow 但具有标准边框和阴影

php - Tinyproxy 和 https 请求

spring - java.net.SocketException : Unexpected end of file from server using Spring's RestTemplate 异常

php - 不破解 CurlException : 60 (cURL SSL Certificate Verification)

python - 由于 EnvironmentError : [Errno 13] 无法安装软件包