Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer installation requirements

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?

like image 513
divHelper11 Avatar asked Oct 27 '25 16:10

divHelper11


2 Answers

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

like image 188
jeanj Avatar answered Oct 29 '25 05:10

jeanj


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.

like image 24
Chris Avatar answered Oct 29 '25 05:10

Chris