libcurl中不支持或禁用协议"https"

Bis*_*sta 15 macos google-maps libcurl ios firebase

这是我的Podfile内容:

platform :ios, ‘8.0’
use_frameworks!

target 'Project-Name' do

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

end
Run Code Online (Sandbox Code Playgroud)

添加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
Run Code Online (Sandbox Code Playgroud)

编辑1: 如何在Mac OS X上启用curl SSL?

./configure --with-darwinssl 不工作

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


编辑2: 如何在libcurl中启用https支持?

此命令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 
Run Code Online (Sandbox Code Playgroud)

此命令不起作用:

$ otool -L /usr/local/git/libexec/git-core/git-http-push | grep curl
/usr/lib/libcurl.4.dylib
Run Code Online (Sandbox Code Playgroud)

/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:internal objdump命令失败二进制文件/usr/lib/libcurl.4.dylib匹配


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


编辑:4 在OSX上通过MacPorts安装的卷曲中启用HTTPS支持

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

sudo:port:找不到命令

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

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

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

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

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

$ 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
Run Code Online (Sandbox Code Playgroud)

Lam*_*our 5

安装后macOS High Sierra,我在通过pod.

诀窍是删除卷曲并重新安装:

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 
Run Code Online (Sandbox Code Playgroud)

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

那么你应该很高兴:)

  • 对我不起作用..警告:curl:这个公式没有 --with-darwinssl 选项,所以它会被忽略! (2认同)

Pau*_*ien 3

您可能需要更新 git。单程:

brew install git
Run Code Online (Sandbox Code Playgroud)

更多这里