wp-cli: OpenSSL error with `wp package install`
When running wp package install <package>, I get the following error:
Error: The "https://wp-cli.org/package-index/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest algorithm
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
If I use wget or curl on the CLI to fetch that URL, they both work as expected (and they don’t skip verifying the cert), as does fetching the URL in Chrome or Firefox.
Using HTTPie, I get a different error:
http: error: SSLError: [Errno 1] _ssl.c:507: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
Env: OS X 10.10.3 with OpenSSL 0.9.8zd
wp --info:
PHP binary: /Users/John/.phpbrew/php/php-5.6.12/bin/php
PHP version: 5.6.12
php.ini used: /Users/John/.phpbrew/php/php-5.6.12/etc/php.ini
WP-CLI root dir: /Users/John/wp-cli
WP-CLI packages dir: /Users/John/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config: /sites/wp/trunk/wp-cli.yml
WP-CLI version: 0.24.0-alpha
Any suggestions?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 15 (4 by maintainers)
and then add this to your php.ini file
restart your php service
Hello @adampatterson,
Had the same issue than you, then I searched for those stackoverflow posts: first post second post Those worked for me.
In short, MAMP < 4.0.0 OpenSSL version is not compatible with wp-cli package install. I upgraded MAMP to > 4.0.0, now it works fine.
Having this issue as well (OS X 10.10.5, WP-CLI 0.25.0). Did a few things that seemed like I was on the right track but I’m stuck:
brew update && brew upgradeopensslv.0.9.8 executable with a symlink as specified in this post to version1.0.2jwp-cliviabrew install wp-cliand changed$PATHto hit that versionAll versions seem to be current but I’m still getting the
unknown message digest algorithmerror. Any clues would be helpful!I’m having the same issue here.
I try to update OpenSSL and cURL using brew with not success.
Maybe the next details can help.
OpenSSL Details
cURL details
And finally my Mac details