OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Failed to enable crypto

前端 未结 2 1979
不知归路
不知归路 2020-12-11 12:09

I am using OS X Yosemite

I ran the following command in Composer because Laravel fails to download and install properly all the time:

composer diagnose

2条回答
  •  盖世英雄少女心
    2020-12-11 12:44

    Note: I am running OS X Yosemite. I believe this works with Mavericks too.

    After looking a several answers and combining them mixing and matching etc. Here is a rough explanation on what I did.

    1. Open the command line and run:

    locate cacert.pem

    This will list all the locations where your certificates are.

    My result:

    /Applications/Adobe Dreamweaver CS6/Configuration/Certs/cacert.pem
    /Applications/MAMP/Library/lib/python2.7/test/pycacert.pem
    /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/_vendor/requests/cacert.pem
    /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/pycacert.pem
    /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_asyncio/pycacert.pem
    /Users/robert/.composer/cacert.pem
    /opt/vagrant/embedded/cacert.pem
    /usr/ssl/certs/cacert.pem
    
    1. I downloaded the most recent one from curl

    http://curl.haxx.se/docs/caextract.html

    1. I made a directory in /usr/ssl/certs/

    and put the downloaded cert there /usr/ssl/certs/cacert.pem

    1. I opened up my php.ini file and placed this line at the top of the file: openssl.cafile=/usr/ssl/certs/cacert.pem

    2. Restart apache (stop apache and start it again)

    Everything worked out for me.

    Now one thing that I do believe needs to be done is you need to tell the command line which PHP you are referring to. I am running PHP under XAMPP and not natively on my OS X. So the command line will think that you are referring to the native PHP on OS X and not the one running on XAMPP. This needs to be changed I believe for this to work. If not then it should be good.

    As mentioned this solution worked for me.

提交回复
热议问题