How do I enable https support in libcurl?

后端 未结 3 867
我在风中等你
我在风中等你 2020-12-06 00:12

When I try to $ brew update I\'m getting the error:

error: Protocol https not supported or disabled in libcurl while accessing https://github.co         


        
相关标签:
3条回答
  • 2020-12-06 01:00

    How can I determine the path to the curl that brew is using?

    Homebrew uses /usr/bin/curl, i.e the version that ships with Mac OS X, as you can see here.

    That being said, and as you precise, your problem is probably related to the version of libcurl that is linked with git and used for http:// and https://.

    Perform a which git to determine which is the version you are being used (mine is installed under /usr/local).

    Then scan the shared libraries used as follow:

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

    Replace /usr/local/ with the install directory that corresponds to your git.

    Since the libcurl version used by your git exec lacks of HTTPS support, this will tell you what is this version and where it is installed.

    0 讨论(0)
  • 2020-12-06 01:00

    This worked for me:

    Re-install curl and install it using the following commands (after unpacked):

    $ ./configure --with-darwinssl    
    $ make    
    $ make test    
    $ sudo make install
    

    When you run the command "curl --version" you'll notice that the https protocol is now present under "protocols".

    Useful site to refer when you run into curl problems: https://curl.haxx.se/docs/install.html

    0 讨论(0)
  • 2020-12-06 01:10

    I had this issue on OSX. The issue were duplicate curl and curl.config files inside usr/local/bin that conflicted the same two files in usr/bin. I deleted the first set in the local/bin and Terminal worked after that.

    0 讨论(0)
提交回复
热议问题