使用pear下载包出现:No releases available for package "pear.php.net/PHP_CodeSniffer"


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

看吧~成功了

声明:程序猿甜品店|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - 使用pear下载包出现:No releases available for package "pear.php.net/PHP_CodeSniffer"


不一定每天code well,但每天都要live well