So you’ve landed a brand new Mac and it never fails you need to get it up and running for development. Fast! So you install Xcode and all the command line tools as well as your favorite IDE(s) and what not. Then somewhere along the way you try to install brew and you get saddled with:
curl: (77) error setting certificate verify locations: CAfile: /usr/local/etc/openssl/certs/cert.pem CApath: none
This lovely SSL error stops me dead in my tracks every time. Over time I’ve seen numerous was of dealing with the phenomena but the best is a simple shell script like the following:
#!/usr/bin/env bash sudo mkdir /usr/local/etc cd /usr/local/etc sudo ln -s /etc/ssl openssl cd openssl/certs sudo ln -s ../cert.pem
So the script simply makes use of the cert.pem already installed on the Mac and makes the assumption that you have admin rights via sudo. It is that easy to fix the missing CAfile: /usr/local/etc/openssl/certs/cert.pem issue and be on your way to running brew in no time.