OwnCloudの開発環境を作るために Development Environment — ownCloud Developer Manual 10.0.9 documentation を参考にしながら進めていたのですが、ソースコードを git で取得したあと make しようとしたらエラーが発生してしまいました。どうやら PHP7.0 だとうまくいかないようで、PHP7.1 に入れ替えたらうまくいきました。
$ cd core
$ make
Building core
Note: You can type ‘make help’ for more targets
cd build && ./getcomposer.sh
php build/composer.phar install –dev
You are using the deprecated option “dev”. Dev packages are installed by default now.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 122 installs, 0 updates, 0 removals
– Installing ocramius/package-versions (1.3.0): Downloading (100%)
PHP Fatal error: Uncaught TypeError: Return value of PackageVersions\Installer::activate() must be an instance of PackageVersions\void, none returned in /var/www/html/core/lib/composer/ocramius/package-versions/src/PackageVersions/Installer.php:62
Stack trace:
#0 phar:///var/www/html/core/build/composer.phar/src/Composer/Plugin/PluginManager.php(236): PackageVersions\Installer->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#1 phar:///var/www/html/core/build/composer.phar/src/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(PackageVersions\Installer))
#2 phar:///var/www/html/core/build/composer.phar/src/Composer/Installer/PluginInstaller.php(62): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage), true)
#3 phar:///var/www/html/core/build/composer.phar/src/Composer/Installer/InstallationManager.php(173): Composer\Installer\PluginInstaller->install(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Package\Com in /var/www/html/core/lib/composer/ocramius/package-versions/src/PackageVersions/Installer.php on line 62
Fatal error: Uncaught TypeError: Return value of PackageVersions\Installer::activate() must be an instance of PackageVersions\void, none returned in /var/www/html/core/lib/composer/ocramius/package-versions/src/PackageVersions/Installer.php:62
Stack trace:
#0 phar:///var/www/html/core/build/composer.phar/src/Composer/Plugin/PluginManager.php(236): PackageVersions\Installer->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#1 phar:///var/www/html/core/build/composer.phar/src/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(PackageVersions\Installer))
#2 phar:///var/www/html/core/build/composer.phar/src/Composer/Installer/PluginInstaller.php(62): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage), true)
#3 phar:///var/www/html/core/build/composer.phar/src/Composer/Installer/InstallationManager.php(173): Composer\Installer\PluginInstaller->install(Object(Composer\Repository\InstalledFilesystemRepository), Object(Composer\Package\Com in /var/www/html/core/lib/composer/ocramius/package-versions/src/PackageVersions/Installer.php on line 62
make: *** [lib/composer/phpunit] エラー 255
PHP のバージョンを確認。
$ php -v
PHP 7.0.31 (cli) (built: Jul 17 2018 15:30:29) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
このサイト(Error when using Composer 1.6.4 with PHP 7.0 · Issue #64 · Ocramius/PackageVersions · GitHub)によると、Composer が PHP7.0 のときうまくないらしいことがわかりましたが、対応策がよくわからなかったので、PHPを7.1に入れ替えました。
# yum remove –enablerepo=remi-php70 php php-devel php-mbstring php-pdo php-gd php-mysqlnd php-xml php-zip php-intl php-process
# sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
http://rpms.famillecollet.com/enterprise/remi-release-7.rpm を取得中
準備しています… ################################# [100%]
パッケージ remi-release-7.5-2.el7.remi.noarch は既にインストールされています。
# yum install –enablerepo=remi-php71 php php-devel php-mbstring p
hp-pdo php-gd php-mysqlnd php-xml php-zip php-intl php-process
0件のコメント