Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install these PHP extensions on Ubuntu? [duplicate]

Tags:

php

nginx

ubuntu

  • Ubuntu 16.04.
  • nginx version: nginx/1.10.0 (Ubuntu)
  • PHP 7.0.8-0ubuntu0.16.04.3

When I run composer install -v in Magento 2 directory I get this:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Dependency resolution completed in 0.000 seconds
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
  Problem 2
    - The requested PHP extension ext-dom * is missing from your system. Install or enable PHP's dom extension.
  Problem 3
    - The requested PHP extension ext-simplexml * is missing from your system. Install or enable PHP's simplexml extension.
  Problem 4
    - The requested PHP extension ext-mcrypt * is missing from your system. Install or enable PHP's mcrypt extension.
  Problem 5
    - The requested PHP extension ext-curl * is missing from your system. Install or enable PHP's curl extension.
  Problem 6
    - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
  Problem 7
    - The requested PHP extension ext-xsl * is missing from your system. Install or enable PHP's xsl extension.
  Problem 8
    - The requested PHP extension ext-mbstring * is missing from your system. Install or enable PHP's mbstring extension.
  Problem 9
    - The requested PHP extension ext-zip * is missing from your system. Install or enable PHP's zip extension.
  Problem 10
    - Installation request for braintree/braintree_php 3.7.0 -> satisfiable by braintree/braintree_php[3.7.0].
    - braintree/braintree_php 3.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
  Problem 11
    - Installation request for pelago/emogrifier v0.1.1 -> satisfiable by pelago/emogrifier[v0.1.1].
    - pelago/emogrifier v0.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
  Problem 12
    - Installation request for phpunit/phpunit 4.1.0 -> satisfiable by phpunit/phpunit[4.1.0].
    - phpunit/phpunit 4.1.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
  Problem 13
    - Installation request for theseer/fdomdocument 1.6.1 -> satisfiable by theseer/fdomdocument[1.6.1].
    - theseer/fdomdocument 1.6.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
  Problem 14
    - theseer/fdomdocument 1.6.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - sebastian/phpcpd 2.0.0 requires theseer/fdomdocument ~1.4 -> satisfiable by theseer/fdomdocument[1.6.1].
    - Installation request for sebastian/phpcpd 2.0.0 -> satisfiable by sebastian/phpcpd[2.0.0].

How do I install these extensions? I have LEMP stack installed.

like image 693
rits Avatar asked Jan 11 '17 11:01

rits


People also ask

How to install PHP on Linux?

Start your Linux terminal. On your Linux computer, open the Linux terminal. Then, step 2: Launch the terminal. Then, proceed to step 3. This command will let you update your packages on your terminal…. Step 2: Launch your terminal and do the same. The third step is to upgrade your packages… Getting your PHP installed is Step 4.

How do you check if PHP extension is enabled in Ubuntu?

In PHPinfo ().;, you can choose “Ctrl + F” in your web browser, type in the desired extension’s first 3-4 letters, and it should bring up a list of whether or not it is loaded. How Do You Check Php Extension Is Enabled In Ubuntu?

How do I open a PHP extension?

An extension or library in PHP provides a mechanism for developing applications and supporting various languages. How Do I Open A Php Extension? When you view a PHP file, you merely need a simple text editor, like Notepad, Notepad++, Sublime Text, Vi, and so on, since the files are highly readable readable and not very messy.

How to fix the PHP Extension EXT-GD * is missing?

Problem 1 - The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension. Problem 2 - The requested PHP extension ext-dom * is missing from your system. Install or enable PHP's dom extension.


1 Answers

You can most probably use your package manager to do this. For the gd extension specifically you can run

sudo apt-get update && sudo apt-get install php7.0-gd

And there is probably a similar package for the rest of the extensions available. with apt-cache search you can search for packages. for example

 apt-cache search php7.0

will find you all packages related to php7.0

like image 166
J. Meijers Avatar answered Sep 23 '22 16:09

J. Meijers