11

How can i get the newerst version of cURL instead of the old 7.24 that Apple provide.

user:~ kevinsimper$ curl --version
curl 7.31.0 (x86_64-apple-darwin12.4.0) libcurl/7.31.0 OpenSSL/0.9.8x zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz 

When i install with Brew I am notified that it is a keg-only and if i do

brew link curl --force

the version is stil 7.24, but the protocols have been updated.

Kuser:~ kevinsimper$ curl --version
curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz 
user:~ kevinsimper$ which curl
/usr/bin/curl

If i then delete the "apple" curl, the function is not executable.

user:~ kevinsimper$ curl --version
curl 7.31.0 (x86_64-apple-darwin12.4.0) libcurl/7.31.0 OpenSSL/0.9.8x zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz 
user:~ kevinsimper$ brew install postgresql
==> Installing postgresql dependency: ossp-uuid
==> Downloading ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz
Error: /usr/bin/curl is not executable
  • 4
    Don't delete Apple supplied files - the OS might still use them and it won't use homebrew files. To use the homebrew file you need to set your PATH - see may questions here – Mark Jul 8 '13 at 11:14
5

Add export PATH=/usr/local/bin:$PATH to your .bashrc for example to use the bin installed with Homebrew.

  • 2
    Or .bash_profile. Terminal and iTerm open new shells as login shells by default, so bash doesn't read .bashrc. – Lri Jul 8 '13 at 17:41
  • Will this cause problems for the system since you're putting the new curl's binary in front of the system's curl binary? – CMCDragonkai Jan 16 '14 at 8:03
  • 1
    Nope since it's only for your terminal session. – Matthieu Riegler Jan 16 '14 at 10:07
  • When I do this, it still shows /usr/bin/curl as the result of which curl. Any advice? – MadPhysicist Oct 31 '16 at 20:23
  • 1
    @MadPhysicist run brew link curl --force to force Homebrew to symlink curl into usr/local/bin. As long as that is ahead of /usr/bin in your path, then the Homebrew curl should be used. – Daniel Compton Nov 6 '16 at 23:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .