pecl在生产服务器上安装扩展问题

问题描述 投票:5回答:1

所以我在本地安装了pecl oauth模块,这一切都很完美。然后我尝试为生产服务器执行此操作但遇到了一些问题。

如果我说sudo pecl install oauth,我会收到此错误:

No releases available for package "pecl.php.net/oauth"
install failed

所以我想我必须更新pecl.php.net,所以我尝试命令sudo pecl channel-update pecl.php.net,但后来我得到了这个输出:

Updating channel "pecl.php.net"
Channel "pecl.php.net" is not responding over http://, failed with message:
Connection to 'pecl.php.net:80' failed: Connection refused
Trying channel "pecl.php.net" over https:// instead
Cannot retrieve channel.xml for channel "pecl.php.net" (Connection to `pecl.php.net:443' failed: Connection refused)

有任何想法吗?

php production-environment pecl
1个回答
9
投票

好的,我找到了解决方法。您设置了代理,但不是正常的导出http_proxy:方式。这是命令:

sudo pear config-set http_proxy http://username:password@yourproxy:yourport
© www.soinside.com 2019 - 2024. All rights reserved.