error setting certificate verify locations: CAfile
I experienced the same problem, and as far as I can see, it seems to have something to do with Curl being unable to write to that folder, which doesn't make sense because I am root on this machine (and can write files to my cert directory.)
One way to get around this is to force Curl not to established secure connections with a certificate:
echo insecure >> ~/.curlrc