CentOS6.8+PHP5.6にPHPUnitのインストールではまる

other
スポンサーリンク

PHPUnitをいれるため、まずはcomposer.jsonを作成。

{
"require-dev": {
"phpunit/phpunit": "5.5.*"
}
}

ではインストール。

composer install --dev

実行結果

You are using the deprecated option “dev”. Dev packages are installed by default now.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
– phpunit/phpunit 5.5.7 requires ext-dom * -> the requested PHP extension do m is missing from your system.
– phpunit/phpunit 5.5.6 requires ext-dom * -> the requested PHP extension do m is missing from your system.
– phpunit/phpunit 5.5.5 requires ext-dom * -> the requested PHP extension do m is missing from your system.
– phpunit/phpunit 5.5.4 requires ext-dom * -> the requested PHP extension do m is missing from your system.
– phpunit/phpunit 5.5.3 requires ext-dom * -> the requested PHP extension do m is missing from your system.
– phpunit/phpunit 5.5.2 requires ext-dom * -> the requested PHP extension do m is missing from your system.
– phpunit/phpunit 5.5.1 requires ext-dom * -> the requested PHP extension do m is missing from your system.
– phpunit/phpunit 5.5.0 requires ext-dom * -> the requested PHP extension do m is missing from your system.
– Installation request for phpunit/phpunit 5.5.* -> satisfiable by phpunit/p hpunit[5.5.0, 5.5.1, 5.5.2, 5.5.3, 5.5.4, 5.5.5, 5.5.6, 5.5.7].
To enable extensions, verify that they are enabled in your .ini files:
– /etc/php.ini
– /etc/php.d/20-bz2.ini
– /etc/php.d/20-calendar.ini
– /etc/php.d/20-ctype.ini
– /etc/php.d/20-curl.ini
– /etc/php.d/20-exif.ini
– /etc/php.d/20-fileinfo.ini
– /etc/php.d/20-ftp.ini
– /etc/php.d/20-gd.ini
– /etc/php.d/20-gettext.ini
– /etc/php.d/20-iconv.ini
– /etc/php.d/20-mbstring.ini
– /etc/php.d/20-pdo.ini
– /etc/php.d/20-phar.ini
– /etc/php.d/20-sockets.ini
– /etc/php.d/20-sqlite3.ini
– /etc/php.d/20-tokenizer.ini
– /etc/php.d/30-pdo_sqlite.ini
– /etc/php.d/40-json.ini
– /etc/php.d/40-zip.ini
You can also run `php –ini` inside terminal to see which files are used by PH P in CLI mode.

PHP extension domが必要ですよ、と。はいはい。

yum install php-xml

では再度composerインストール、と。

あれ?エラーが変わらない??

ググると「php-mcrypt」も必要かもとのこと。では入れてみる

sudo yum --enablerepo=remi-php56 install php-mcrypt

実行結果

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: ftp.yz.yamagata-u.ac.jp
* epel: mirror.premi.st
* extras: ftp.yz.yamagata-u.ac.jp
* remi-php56: mirror.innosol.asia
* remi-safe: mirror.innosol.asia
* updates: ftp.yz.yamagata-u.ac.jp
Resolving Dependencies
–> Running transaction check
—> Package php-mcrypt.x86_64 0:5.6.30-1.el6.remi will be installed
–> Processing Dependency: libmcrypt.so.4()(64bit) for package: php-mcrypt-5.6.30-1.el6.remi.x86_64
–> Processing Dependency: libltdl.so.7()(64bit) for package: php-mcrypt-5.6.30-1.el6.remi.x86_64
–> Running transaction check
—> Package libmcrypt.x86_64 0:2.5.8-9.el6 will be installed
—> Package libtool-ltdl.x86_64 0:2.2.6-15.5.el6 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================
Installing:
php-mcrypt x86_64 5.6.30-1.el6.remi remi-php56 49 k
Installing for dependencies:
libmcrypt x86_64 2.5.8-9.el6 epel 96 k
libtool-ltdl x86_64 2.2.6-15.5.el6 base 44 k
Transaction Summary
===============================================================================================================================
Install 3 Package(s)
Total download size: 189 k
Installed size: 433 k
Is this ok [y/N]: y
Downloading Packages:
(1/3): libmcrypt-2.5.8-9.el6.x86_64.rpm | 96 kB 00:00
(2/3): libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm | 44 kB 00:00
(3/3): php-mcrypt-5.6.30-1.el6.remi.x86_64.rpm | 49 kB 00:03
——————————————————————————————————————————-
Total 41 kB/s | 189 kB 00:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libtool-ltdl-2.2.6-15.5.el6.x86_64 1/3
Installing : libmcrypt-2.5.8-9.el6.x86_64 2/3
Installing : php-mcrypt-5.6.30-1.el6.remi.x86_64 3/3
Verifying : php-mcrypt-5.6.30-1.el6.remi.x86_64 1/3
Verifying : libmcrypt-2.5.8-9.el6.x86_64 2/3
Verifying : libtool-ltdl-2.2.6-15.5.el6.x86_64 3/3
Installed:
php-mcrypt.x86_64 0:5.6.30-1.el6.remi
Dependency Installed:
libmcrypt.x86_64 0:2.5.8-9.el6 libtool-ltdl.x86_64 0:2.2.6-15.5.el6
Complete!

ではcomposerインストール。….しかし現象変わらず。

ダメもとでこれもしてみるか。

yum --enablerepo=remi-php56 install php-xml

実行結果

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: ftp.yz.yamagata-u.ac.jp
* epel: mirror.premi.st
* extras: ftp.yz.yamagata-u.ac.jp
* remi-php56: mirror.innosol.asia
* remi-safe: mirror.innosol.asia
* updates: ftp.yz.yamagata-u.ac.jp
Resolving Dependencies
–> Running transaction check
—> Package php-xml.x86_64 0:5.6.30-1.el6.remi will be installed
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php-xml-5.6.30-1.el6.remi.x86_64
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php-xml-5.6.30-1.el6.remi.x86_64
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php-xml-5.6.30-1.el6.remi.x86_64
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php-xml-5.6.30-1.el6.remi.x86_64
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php-xml-5.6.30-1.el6.remi.x86_64
–> Processing Dependency: libxslt.so.1()(64bit) for package: php-xml-5.6.30-1.el6.remi.x86_64
–> Processing Dependency: libexslt.so.0()(64bit) for package: php-xml-5.6.30-1.el6.remi.x86_64
–> Running transaction check
—> Package libxslt.x86_64 0:1.1.26-2.el6_3.1 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================
Installing:
php-xml x86_64 5.6.30-1.el6.remi remi-php56 220 k
Installing for dependencies:
libxslt x86_64 1.1.26-2.el6_3.1 base 452 k
Transaction Summary
===============================================================================================================================
Install 2 Package(s)
Total download size: 672 k
Installed size: 2.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): libxslt-1.1.26-2.el6_3.1.x86_64.rpm | 452 kB 00:00
http://mirror.innosol.asia/remi/enterprise/6/php56/x86_64/php-xml-5.6.30-1.el6.remi.x86_64.rpm: [Errno 12] Timeout on http://mirror.innosol.asia/remi/enterprise/6/php56/x86_64/php-xml-5.6.30-1.el6.remi.x86_64.rpm: (28, ‘Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds’)
Trying other mirror.
(2/2): php-xml-5.6.30-1.el6.remi.x86_64.rpm | 220 kB 00:00
——————————————————————————————————————————-
Total 6.8 kB/s | 672 kB 01:38
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libxslt-1.1.26-2.el6_3.1.x86_64 1/2
Installing : php-xml-5.6.30-1.el6.remi.x86_64 2/2
Verifying : libxslt-1.1.26-2.el6_3.1.x86_64 1/2
Verifying : php-xml-5.6.30-1.el6.remi.x86_64 2/2
Installed:
php-xml.x86_64 0:5.6.30-1.el6.remi
Dependency Installed:
libxslt.x86_64 0:1.1.26-2.el6_3.1
Complete!

ではあらためて….

composer install --dev

実行結果

You are using the deprecated option “dev”. Dev packages are installed by default now.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 25 installs, 0 updates, 0 removals
– Installing symfony/yaml (v3.2.4) Downloading: 100%
– Installing sebastian/version (2.0.1) Downloading: 100%
– Installing sebastian/resource-operations (1.0.0) Downloading: 100%
– Installing sebastian/recursion-context (1.0.2) Downloading: 100%
– Installing sebastian/object-enumerator (1.0.0) Downloading: 100%
– Installing sebastian/global-state (1.1.1) Downloading: 100%
– Installing sebastian/exporter (1.2.2) Downloading: 100%
– Installing sebastian/environment (2.0.0) Downloading: 100%
– Installing sebastian/diff (1.4.1) Downloading: 100%
– Installing sebastian/comparator (1.2.4) Downloading: 100%
– Installing doctrine/instantiator (1.0.5) Downloading: 100%
– Installing phpunit/php-text-template (1.2.1) Downloading: 100%
– Installing phpunit/phpunit-mock-objects (3.4.3) Downloading: 100%
– Installing phpunit/php-timer (1.0.8) Downloading: 100%
– Installing phpunit/php-file-iterator (1.4.2) Downloading: 100%
– Installing sebastian/code-unit-reverse-lookup (1.0.0) Downloading: 100%
– Installing phpunit/php-token-stream (1.4.10) Downloading: 100%
– Installing phpunit/php-code-coverage (4.0.6) Downloading: 100%
– Installing webmozart/assert (1.2.0) Downloading: 100%
– Installing phpdocumentor/reflection-common (1.0) Downloading: 100%
– Installing phpdocumentor/type-resolver (0.2.1) Downloading: 100%
– Installing phpdocumentor/reflection-docblock (3.1.1) Downloading: 100%
– Installing phpspec/prophecy (v1.6.2) Downloading: 100%
– Installing myclabs/deep-copy (1.6.0) Downloading: 100%
– Installing phpunit/phpunit (5.4.8) Downloading: 100%
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.4.0)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files

いけた!

CentOS 7実践ガイド (impress top gear)

CentOS 7実践ガイド (impress top gear)

継続的インテグレーション入門

継続的インテグレーション入門

  • 作者: ポール・M・デュバル,スティーブ・M・マティアス,アンドリュー・グローバー,大塚庸史,丸山大輔,岡本裕二,亀村圭助
  • 出版社/メーカー: 日経BP社
  • 発売日: 2009/08/06
  • メディア: 単行本
  • 購入: 18人 クリック: 388回
  • この商品を含むブログ (37件) を見る
CakePHPで学ぶ継続的インテグレーション

CakePHPで学ぶ継続的インテグレーション

継続的デリバリー 信頼できるソフトウェアリリースのためのビルド・テスト・デプロイメントの自動化

継続的デリバリー 信頼できるソフトウェアリリースのためのビルド・テスト・デプロイメントの自動化

タイトルとURLをコピーしました