4

I am trying to install composer to the laravel project. When im doing sudo composer install in projects directory it shows me two errors:

Problem 1
    - Installation request for simplesoftwareio/simple-qrcode dev-master -> satisfiable by simplesoftwareio/simple-qrcode[dev-master].
    - simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
  Problem 2
    - Installation request for esendex/sdk ^1.3 -> satisfiable by esendex/sdk[v1.3.0].
    - esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.

I was checking how to install it and I found these commands:

  1. composer require simplesoftwareio/simple-qrcode
  2. composer require esendex/sdk

Anyway, they are giving me the same error. Is there anything I can do about it?

divHelper11
  • 2,090
  • 3
  • 22
  • 37

2 Answers2

9

Looks like you have some PHP modules missing.

For PHP5

sudo apt-get install php5-curl
sudo apt-get install php5-gd

For PHP7

sudo apt-get install php7-curl
sudo apt-get install php7-gd

Packages may be different depending on your OS

jeanj
  • 2,106
  • 13
  • 22
  • It showed me that php5-curl could not be found but I just wrote `sudo apt-get install php*-curl` and it works. Thanks :) – divHelper11 Nov 24 '16 at 07:49
2

Is there anything I can do about it?

Yes. You can install the two PHP modules that Composer tells you are required:

  • simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
  • esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.

Exactly how you do that will depend on your operating system.

Ubuntu 16.10, for example, offers php-gd and php-curl system packages.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257