9
19

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 5 years have passed since last update.

composer requireで「Your requirements could not be resolved to an installable set of packages.」エラーが出たときの対処法。

Last updated at Posted at 2019-06-13

##問題
composer require 〇〇でパッケージをインストールしようと以下のエラーが出てインストールができない。

Using version ^1.0 for abraham/twitteroauth
./composer.json has been updated
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
    - abraham/twitteroauth 1.0.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - abraham/twitteroauth 1.0.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - Installation request for abraham/twitteroauth ^1.0 -> satisfiable by abraham/twitteroauth[1.0.0, 1.0.1].
  To enable extensions, verify that they are enabled in your .ini files:
    - C:\php-7.3.5-nts-Win32-VC15-x64\php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.

##解決策
エラーの内容を見るとcurlが見当たらないことが問題らしい。

the requested PHP extension curl is missing from your system.

php.iniを開き、curlのコメントアウトを外し。有効化すればインストールが可能になる。

;extension=curl
↓
extension=curl

##参考
composerで怒られた. the requested PHP extension curl is missing from your system
https://kengotakimoto.com/post-2754/

9
19
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
9
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?