1
votes

I upgraded to OSX 10.11 and I cannot use curl anymore correctly

trying to set a fresh installation of HomeBrew using :

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

as stated on HomeBrew site ( http://brew.sh )

I get the error :

curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.

the system version of curl is at /usr/bin

$ curl --version curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets

this errors means : CURLE_NOT_BUILT_IN (4)

A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision. This means that a feature or option was not enabled or explicitly disabled when libcurl was built and in order to get it to function you have to get a rebuilt lib curl.

but how can i solve it if I don't know which decision to rebuild :...

I tried to download , build and install the latest curl version (curl-7.45.0.tar.gz ) .. standard configure/make/install ( OSX 10.11 Xcode 7.0 CLI installed ...) but the command curl doesn't use this binary , it use always the system curl...

==== I don't understand how lib curl is installed ... so messy

        /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Develo per/SDKs/MacOSX10.11.sdk/usr/lib/libcurl.3.tbd
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libcurl.4.tbd
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libcurl.tbd
    /usr/lib/libcurl.3.dylib
    /usr/lib/libcurl.4.dylib
    /usr/lib/libcurl.dylib
    /usr/local/Library/ENV/pkgconfig/10.10/libcurl.pc
    /usr/local/Library/ENV/pkgconfig/10.11/libcurl.pc
    /usr/local/Library/ENV/pkgconfig/10.5/libcurl.pc
    /usr/local/Library/ENV/pkgconfig/10.8/libcurl.pc
    /usr/local/Library/ENV/pkgconfig/10.9/libcurl.pc
    /usr/local/MacGPG2/lib/libcurl.4.dylib
    /usr/local/MacGPG2/lib/libcurl.a
    /usr/local/MacGPG2/lib/libcurl.dylib

===UPDATE 1

            ~ $ otool -L /usr/bin/curl/usr/bin/curl:
            /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 8.0.0)
            /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)

=== UPDATE 2 here are the current protocols & options configured which one are missing to run correctly curl ...

     curl version:     7.45.0
      Host setup:       x86_64-apple-darwin15.0.0
      Install prefix:   /usr/local
      Compiler:         gcc
      SSL support:      no      (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl,darwinssl} )
      SSH support:      no      (--with-libssh2)
      zlib support:     enabled
      GSS-API support:  no      (--with-gssapi)
      TLS-SRP support:  no      (--enable-tls-srp)
      resolver:         default (--enable-ares / --enable-threaded-resolver)
      IPv6 support:     enabled
      Unix sockets support: enabled
      IDN support:      no      (--with-{libidn,winidn})
      Build libcurl:    Shared=no, Static=yes
      Built-in manual:  enabled
      --libcurl option: enabled (--disable-libcurl-option)
      Verbose errors:   enabled (--disable-verbose)
      SSPI support:     no      (--enable-sspi)
      ca cert bundle:   no
      ca cert path:     no
      LDAP support:     enabled (OpenLDAP)
      LDAPS support:    enabled
      RTSP support:     enabled
      RTMP support:     no      (--with-librtmp)
      metalink support: no      (--with-libmetalink)
      HTTP2 support:    disabled (--with-nghttp2)
      Protocols:        DICT FILE FTP GOPHER HTTP IMAP LDAP LDAPS POP3 RTSP SMTP TELNET TFTP
1
Since you seem to have installed some curl libraries yourself, you may first want to find out which library curl is actually using: otool -L /usr/bin/curl.user707650
Can you guarantee that the ruby line actually uses the system curl? Perhaps replace curl in that line with /usr/bin/curl to be certain.user707650
I already tried /usr/bin/curl ... same issue ) @Evert updated the question with tool -L output does(t give me more info ?user762579
Make sure you don't have SSL_CERT_DIR environment variable set. Check: env|grep SSL_CERT_DIR.baf
I just succeeded now ... using CFLAGS="-arch i386" ./configure --prefix=/usr/local/curl-7.45.0 --with-ssl=/usr/local/openssl-1.0.2d and ruby -e "$(curl -k raw.githubusercontent.com/Homebrew/install/master/install)" it seems that the option -k is fine ... but not -fsSL !!!user762579

1 Answers

0
votes

I did a fresh installation of HomeBrew using the -k option with curl

CFLAGS="-arch i386" ./configure --prefix=/usr/local/curl-7.45.0 --with-ssl=/usr/local/openssl-1.0.2d and ruby -e "$(curl -k raw.githubusercontent.com/Homebrew/install/master/install)";

then its as easy install a brand new curl ready for El Capitan (w OpenSSL as ad dependency...) and then all the way to rbenv, ruby and rails ...