我按照说明安装PHP CAS as described on their website
用梨子 最新稳定版(当前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
答案 0 :(得分:1)
我尝试使用我的设置安装此软件包并得到相同的错误。包装本身可能有问题。 尝试下载文件并从本地源安装。
[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 ~]$