【问题标题】:Protocol "https" not supported or disabled in libcurllibcurl 中不支持或禁用协议“https”
【发布时间】:2017-01-10 07:18:48
【问题描述】:

这是我的 Podfile 内容:

platform :ios, ‘8.0’
use_frameworks!

target 'Project-Name' do

pod 'Firebase/Core'
pod 'Firebase/Messaging'

end

pod 'GoogleMaps' 添加到 Podfile 时出现同样的错误。

在终端上运行pod install --verbose command 时出错:

[!] Error installing Firebase
[!] /usr/local/bin/curl -f -L -o /var/folders/1t/102_4r0x1_3_5dlq8zdbm27r0000gn/T/d20160902-4388-1omozrn/file.tgz https://www.gstatic.com/cpdc/cc5f7aac07ccdd0a/Firebase-3.5.0.tar.gz --create-dirs --netrc-optional

curl: (1) Protocol "https" not supported or disabled in libcurl

编辑 1: How do I enable curl SSL on Mac OS X?

./configure --with-darwinssl 不工作。

-bash: ./configure: 没有这样的文件或目录


编辑 2: How do I enable https support in libcurl?

这个命令brew install curl --with-libssh2在终端上执行,但不知道下一步该做什么:

UB:lib aspl$ brew install curl --with-libssh2 --verbose
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

Warning: curl-7.50.1 already installed
UB:lib aspl$ curl --version
curl 7.48.0 (x86_64-apple-darwin14.5.0) libcurl/7.48.0 zlib/1.2.5
Protocols: dict file ftp gopher http imap ldap ldaps pop3 rtsp smtp telnet tftp 
Features: IPv6 Largefile libz UnixSockets 

此命令不起作用:

$ otool -L /usr/local/git/libexec/git-core/git-http-push | grep curl
/usr/lib/libcurl.4.dylib

/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '/usr/local/bin/git/libexec/git-core/git-http-push' : 不是目录。 致命错误:/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool:内部 objdump 命令失败 二进制文件 /usr/lib/libcurl.4.dylib 匹配


Edit:3终端命令which git显示/usr/local/bin/git


编辑:4 Enabling HTTPS Support in Curl Installed Through MacPorts on OSX

运行sudo port install curl +sslsudo port uninstall curl 说:

sudo:端口:找不到命令

并使用以下链接安装端口(MacPorts),这又是一个 HTTPS 链接:

$ curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.3.4.tar.bz2

还有MacPort文件夹的下载选项吗?

但是如何处理下载的MacPorts-2.3.4 文件夹?

编辑 5: 强制卸载 curl 并再次安装不起作用:(

$ brew uninstall curl
Uninstalling /usr/local/Cellar/curl/7.50.1... (366 files, 2.6M)
curl 7.46.0 is still installed.
Remove them all with `brew uninstall --force curl`.
$ brew uninstall --force curl
Uninstalling curl... (360 files, 2.6M)
$ brew install curl --with-libssh2 --verbose
Error: curl 7.50.2 did not build
Logs:
     /Users/aspl/Library/Logs/Homebrew/curl/01.configure
     /Users/aspl/Library/Logs/Homebrew/curl/01.configure.cc
     /Users/aspl/Library/Logs/Homebrew/curl/02.make
     /Users/aspl/Library/Logs/Homebrew/curl/config.log

These open issues may also help:
curl: migrate to openssl@1.1 https://github.com/Homebrew/homebrew-core/pull/4591

【问题讨论】:

  • 你知道你最初是如何得到这个破碎版本的 curl 的吗? Curl 已经预装在 MacOS X 上,https 开箱即用。您是否手动安装或升级到更新版本?如果是这样 - 你是怎么做到的?
  • 我不知道..但是有什么方法可以恢复或安装它的正确版本吗?
  • 这只是猜测。它可能会让你的情况变得更糟。但我会尝试运行brew uninstall curl。然后再次执行“curl”。也许你会回退到带有 https 支持的默认 curl。如果 curl 被完全删除,那么你可以在之后执行 brew install curl --with-libssh2 --verbose 。同样,这是有风险的。如果没有 curl 在您的系统上,Brew 可能无法下载任何内容。但这是我唯一的建议:(
  • 更新了我的问题,没有用
  • 有了这个新操作系统,现在我也面临同样的问题 :) smh

标签: ios macos google-maps firebase libcurl


【解决方案1】:

您可能需要更新 git。一种方式:

brew install git

更多here

【讨论】:

【解决方案2】:

在我安装了macOS High Sierra 之后,我在通过pod 安装firebase 时遇到了同样的问题。

诀窍是删除 curl 并重新安装:

curl --version // you will see the https protocol is missing, and the version would be 7.56.1 if you did try to update it before  
brew remove curl 
brew install curl --with-darwinssl // install with darwin instead of openssl 
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrc // run this 

在您关闭并退出所有终端或 iTerm 后,再次打开它运行 brew doctor 然后运行 ​​curl --version 您应该会在协议列表中看到 https

那么你应该很高兴:)

【讨论】:

  • 目前无法重现该错误,但会将其标记为有帮助!
  • 对我没用.. 警告:curl:此公式没有 --with-darwinssl 选项,因此将被忽略!
  • 太棒了:)。工作正常
【解决方案3】:

您的网址已损坏。检查 URL 开头的空格或其他字符(httphttps 之前)。

【讨论】:

    猜你喜欢
    • 2019-08-06
    • 2012-03-24
    • 2017-09-14
    • 2020-01-22
    • 2017-09-08
    • 2020-04-09
    • 2015-03-16
    • 2019-03-28
    • 2011-10-16
    相关资源
    最近更新 更多