valet-plus
valet-plus copied to clipboard
PECL packages not installing on Catalina with OpenSSL (LibreSSL)
- [x] I've checked the issue queue and could not find anything similar to my bug.
- [x] I'm on the latest version of valet-plus (
valet --version
):<Valet-Plus-Version>
- [x] I've run
valet fix
andvalet install
after updating and before submitting my issue/feature.
What is the problem? After installing valet plus 2.0.0 on a brand new Mac with Catalina PECL packages are unable to install.
What was supposed to happen? A full installation of Valet+ 2.0.0
What actually happened? Errors during the installation
Notes
This is already solved for me and discussed with @Neodork. In my case i did not have the folder/usr/local/etc/openssl/
. I've created the folder and had to use curl -O https://curl.haxx.se/ca/cacert-2020-01-01.pem && mv cacert-2020-01-01.pem cert.pem
to get a certificate which will be used. It could be a nice addition to add this in the installation of valet.
So as mentioned by @jellesiderius you're not able to download from PECL when you're running on LibreSSL (which comes with new MacOS Catalina). This is due to the CA certificate not being configured.
Generally you can check if yours is configured by running php --info | grep cafile
. And check if the path that is reported exists. If it doesn't exist you'll need to configure the location manually.
Most of the time PHP refers to /usr/local/etc/openssl/cert.pem
which doesn't exist. You can fix that by downloading the latest Cacert file and putting it in the mentioned location:
curl -O https://curl.haxx.se/ca/cacert-2020-01-01.pem && mv cacert-2020-01-01.pem cert.pem
We'll try to add valet fix
checks for this.
What also works, is installing openssl through brew if it is not already installed, then symlinking openssl ssl folder.
brew install openssl
or brew reinstall openssl
ln -s /usr/local/etc/[email protected] /usr/local/etc/openssl
This seems to be more of a location of the certificate issue. Another way is changing the openssl locations in the php.ini
Replaced PECL by shivammathur.