Evan Phibbs
Evan Phibbs

Reputation: 131

mac OSX Lion Homebrew install curl (77)

curl: (77) error setting certificate verify locations:

CAfile: /usr/share/ssl/certs/ca-bubdle.crt

CApath: none

When I tried to download homebrew, I got this error. I have looked at posts with similar errors to this, but none of the fixes for them solved my issue and I have not seen anyone else with this issue on a mac with OSX Lion. Could someone please help me?

Upvotes: 3

Views: 4259

Answers (2)

igraczech
igraczech

Reputation: 2447

I had similar issue after messing up with my curl, brew, rvm and who knows what else, resulting in completely broken 'pod install' command.

Went to /usr/local/opt/curl and found out that the curl-ca-bundle.crt was created by root user, thus inaccessible to curl running as user. Fixed that with:

sudo chmod user:group curl-ca-bundle.crt

...and voilá, curl is back. So the (77) error could mean that the CA file is there, but is not readable for some reason.

Upvotes: 0

Christian Fazzini
Christian Fazzini

Reputation: 19713

Unfortunately curl-ca-bundle does not exist anymore in Homebrew.

I followed the suggest at https://gist.github.com/1stvamp/2158128 which basically does:

mkdir /tmp/curl-ca-bundle
cd /tmp/curl-ca-bundle
wget http://curl.haxx.se/download/curl-7.22.0.tar.bz2
tar xzf curl-7.22.0.tar.bz2
cd curl-7.22.0/lib/

Check if you the directory /usr/share/curl exists.

If so, make a backup of the existing ca-bundle.crt file

sudo mv /usr/share/curl/ca-bundle.crt /usr/share/curl/ca-bundle.crt.original

If not, then create it via: mkdir /usr/share/curl.

After, move the ca-bundle.crt file to that directory:

sudo mv ca-bundle.crt /usr/share/curl/ca-bundle.crt

Upvotes: 4

Related Questions