Linuxサーバー
CentOS7
PHP5.6
初心者です。
CentOS7 でPHPのextensionのevを導入したくて
pecl install ev
としたところ、
Warning: Invalid argument supplied for foreach() in Command.php on line 259
...
XML Extension not found
となって、結局インストールできないという事態が起こりました。
最初は、こちらの記事を読み、
PECL command produces long list of errors
「おっ 同じだ~ これで解決できたぞ!!⊂(^-^)⊃」
と考えたのですが
やってみても解決しませんでした。(泣)
ちなみにPECLを導入するために、Pearが必要ですが、Pearが悪いのかも??
と思いまして、Pearを入れなおしてみます。
# yum install php56w-pear
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.riken.jp
* extras: ftp.iij.ad.jp
* ius: mirrors.kernel.org
* remi-safe: mirrors.tuna.tsinghua.edu.cn
* updates: ftp.iij.ad.jp
No package php56w-pear available.
ってなってしまうので、下記を実行します。
#rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
#rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
その後
yum install php56w-pear
が成功します。
しかし
# yum install php56w-xml
ってすると
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.riken.jp
* extras: ftp.iij.ad.jp
* ius: mirrors.kernel.org
* remi-safe: mirrors.mediatemple.net
* updates: ftp.iij.ad.jp
* webtatic: sp.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php56w-xml.x86_64 0:5.6.31-1.w7 will be installed
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-xml-5.6.31-1.w7.x86_64
--> Running transaction check
---> Package php56w-common.x86_64 0:5.6.31-1.w7 will be installed
Removing php56w-common.x86_64 0:5.6.31-1.w7 - u due to obsoletes from installed php-common-5.6.31-1.el7.remi.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php56w-common.x86_64 0:5.6.31-1.w7 will be installed
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-1.w7 for package: php56w-xml-5.6.31-1.w7.x86_64
--> Finished Dependency Resolution
Error: Package: php56w-xml-5.6.31-1.w7.x86_64 (webtatic)
Requires: php56w-common(x86-64) = 5.6.31-1.w7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
ってなってしまいます。
もう一度Pearを入れなおしてみます。
# yum install -y --enablerepo=remi,remi-php56 php-pear
すると、やっと!下記が成功します。
pecl install ev