0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Centos7にてcomposer installを行うと「Your requirements could not be resolved to an installable set of packages.」と怒られた

Posted at

なにが起こったか

Centos7に運用中のLaravelプロジェクトをクローンしてcomposer installしたらコケた。

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for php-di/invoker 2.1.0 -> satisfiable by php-di/invoker[2.1.0].
    - php-di/invoker 2.1.0 requires php >=7.3 -> your PHP version (7.2.28) does not satisfy that requirement.
  Problem 2
    - Installation request for doctrine/dbal 2.11.1 -> satisfiable by doctrine/dbal[2.11.1].
    - doctrine/dbal 2.11.1 requires php ^7.3 -> your PHP version (7.2.28) does not satisfy that requirement.
  Problem 3
    - php-di/invoker 2.1.0 requires php >=7.3 -> your PHP version (7.2.28) does not satisfy that requirement.
    - mnapoli/silly 1.7.2 requires php-di/invoker ~2.0 -> satisfiable by php-di/invoker[2.1.0].
    - Installation request for mnapoli/silly 1.7.2 -> satisfiable by mnapoli/silly[1.7.2].

解決方法

エラーメッセージを見る限りPHPのバージョン問題だったので、PHPを7.2から7.4へアップデートした。
※正確にはPHP7.3以上を求められていた。

PHP7.4インストール

$ sudo yum install -y --enablerepo=remi-php74 php which
み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ty1.mirror.newmediaexpress.com
 * epel: nrt.edge.kernel.org
 * extras: ty1.mirror.newmediaexpress.com
 * remi-php74: ftp.riken.jp
 * remi-safe: ftp.riken.jp
 * updates: ty1.mirror.newmediaexpress.com
...

PHPインストール確認

$ php -v
PHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
    with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?