Mac Error: Connection to `ssl://′ failed [How to Solve]


After many tests, I found that even if I change the certificate according to the following practices, there will be “operation timed out” occasionally. Just try a few more times


sudo pecl search mbstring

Connection to ` ssl:// ‘ failed: Operation timed out

Solution steps

php -r “print_ r(openssl_ get_ cert_ locations());”

You will get similar results. Find default_ cert_ Path to file



[default_cert_file] => /usr/local/php5/ssl/cert.pem

[default_cert_file_env] => SSL_CERT_FILE

[default_cert_dir] => /usr/local/php5/ssl/certs

[default_cert_dir_env] => SSL_CERT_DIR

[default_private_dir] => /usr/local/php5/ssl/private

[default_default_cert_area] => /usr/local/php5/ssl

[ini_cafile] => /usr/local/php5/ssl/cert.pem

[ini_capath] => 


Remember that the path of the certificate to be replaced is/usr/local/PHP5/SSL/cert.pem

wget (if Wget cannot be downloaded, please use the browser to download)

sudo mv cacert.pem /usr/local/php5/ssl/cert.pem

sudo pecl search mbstring

No releases available for package “”

After completion, there is no error prompt. It shows that you can connect. Unfortunately, you can’t find the mbstring extension


Similar Posts: