繁体   English   中英

尝试通过 PEAR 安装 CAS 时出现 php_network_getaddress 错误

[英]php_network_getaddress error when trying to install CAS via PEAR

我正在按照 他们网站上的说明安装 PHP CAS

使用 PEAR 最新稳定版本(当前 1.3.4):安装新的

 pear install https://developer.jasig.org/cas-clients/php/current.tgz

但我收到这个错误

$> sudo pear install  https://developer.jasig.org/cas-clients/php/current.tgz
downloading current.tgz ...
Starting to download current.tgz (96,108 bytes)
.....................done: 96,108 bytes
Connection to `__uri:443' failed: php_network_getaddresses: getaddrinfo failed: Name or service not known

我做了一些谷歌搜索,但没有找到关于 PEAR 的任何关于php_network_getaddresses

我的 curl 或 wget 库(无论 PEAR 使用哪个)似乎都很好:

$> wget  https://developer.jasig.org/cas-clients/php/current.tgz
--2017-01-31 21:13:12--  https://developer.jasig.org/cas-clients/php/current.tgz
Resolving developer.jasig.org (developer.jasig.org)... 199.119.127.181
Connecting to developer.jasig.org (developer.jasig.org)|199.119.127.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 96108 (94K) [application/x-gzip]
Saving to: ‘current.tgz’

100%[=====================================================================================================================================================================>] 96,108       537KB/s   in 0.2s

2017-01-31 21:13:13 (537 KB/s) - ‘current.tgz’ saved [96108/96108]

$> curl -O  https://developer.jasig.org/cas-clients/php/current.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 96108  100 96108    0     0   104k      0 --:--:-- --:--:-- --:--:--  104k

如何解决此错误?

$> pear -V
PEAR Version: 1.10.1
PHP Version: 5.6.29
Zend Engine Version: 2.6.0
Running on: Linux hostname 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64

我也尝试用我的设置安装这个包,但得到了同样的错误。 包本身可能有问题。 尝试下载文件并从本地源安装它。

[dimitri@tinynetbook ~]$ pear install  https://developer.jasig.org/cas-clients/php/current.tgz
downloading current.tgz ...
Starting to download current.tgz (96,108 bytes)
.....................done: 96,108 bytes
Connection to `__uri:443' failed: php_network_getaddresses: getaddrinfo failed: Name or service not known
[dimitri@tinynetbook ~]$ pear install  http://developer.jasig.org/cas-clients/php/current.tgz
downloading current.tgz ...
Starting to download current.tgz (96,108 bytes)
.....................done: 96,108 bytes
Connection to `__uri:443' failed: php_network_getaddresses: getaddrinfo failed: Name or service not known
[dimitri@tinynetbook ~]$ pear install  developer.jasig.org/cas-clients/php/current.tgz
Attempting to discover channel "developer.jasig.org/cas-clients/php"...
Attempting fallback to https instead of http on channel "developer.jasig.org/cas-clients/php"...
unknown channel "developer.jasig.org/cas-clients/php" in "developer.jasig.org/cas-clients/php/current.tgz"
invalid package name/package file "developer.jasig.org/cas-clients/php/current.tgz"
install failed
[dimitri@tinynetbook ~]$ wget  developer.jasig.org/cas-clients/php/current.tgz
--2017-01-31 16:27:15--  http://developer.jasig.org/cas-clients/php/current.tgz
Resolving developer.jasig.org (developer.jasig.org)... 199.119.127.181
Connecting to developer.jasig.org (developer.jasig.org)|199.119.127.181|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 96108 (94K) [application/x-gzip]
Saving to: ‘current.tgz’

current.tgz                         100%[================================================================>]  93.86K   325KB/s    in 0.3s    

2017-01-31 16:27:15 (325 KB/s) - ‘current.tgz’ saved [96108/96108]

[dimitri@tinynetbook ~]$ sudo pear install current.tgz 
install ok: channel://__uri/CAS-1.3.4
[dimitri@tinynetbook ~]$ 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM