解决pecl/pear No releases available for package "pecl.php.net/" 以及 could not extract the package.xml file

in 默认分类 with 0 comment

有一台在无外网权限的服务器需要安装memcache,pecl设置了代理然后install出现

No releases available for package "pecl.php.net/memcache"

解决方案是到pecl.php.net/memcache手动下载对应版本的源码包,手动安装

pecl install memcache-4.0.5.2.tgz

然后报错

could not extract the package.xml file from "memcache-4.0.5.2.tgz"

网上没找到有效信息,自己摸索出解决方案:手动处理

tar zxf memcache-4.0.5.2.tgz
mv package.xml memcache-4.0.5.2/
cd memcache-4.0.5.2
pecl install package.xml
Responses