1、更新一下list
PS C:\php> pear list-upgrades;
Connection to `ssl://pear.php.net:443' failed: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
2、出现php未开启ssl,到php.ini中打开ssl;
3、重新更新一下list
PS C:\php> pear list-upgrades
WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update
4、提示channel有更新,更新一下channel
PS C:\php> pear channel-update pear.php.net
Updating channel "pear.php.net"
Update of Channel "pear.php.net" succeeded
5、再尝试upgrade
PS C:\php> pear list-upgrades
Channel pear.php.net: No upgrades available
6、安装你需要的扩展,例如phpcs
PS C:\php> pear install PHP_CodeSniffer-3.4.2
downloading PHP_CodeSniffer-3.4.2.tgz ...
Starting to download PHP_CodeSniffer-3.4.2.tgz (637,880 bytes)
................................................................................................................................done: 637,880 bytes
install ok: channel://pear.php.net/PHP_CodeSniffer-3.4.2
看吧~成功了
著作权归作者所有。
商业转载请联系作者获得授权,非商业转载请注明出处。
作者:JefskyWong ——程序猿甜品店
链接:https://www.jefsky.com/blog/222
来源:https://www.jefsky.com/