23

I installed php7/apache2.4/mysql5.6 via this script, but it turns out that the extensions xsl and intl are missing (need them to run Magento2).

I'm using Ubuntu 14.04.

3 Answers 3

37

If it is for dev purposes only, the easiest way would be use a PPA like ppa:ondrej/php-7.0 and then apt-get install php7.0-intl and apt-get install php7.0-xsl. PPAs should NEVER be used in production.

5
  • 1
    I did "sudo add-apt-repository ppa:ondrej/php-7.0" followed by "sudo apt-get update", then "sudo apt-get install php7.0-intl" and "sudo apt-get install php7.0-xsl". It could download intl but not xsl. But when I do "php -m" I still don't see intl. Did I do something wrong? And yes it's for testing purpose :)
    – Henry
    Dec 16, 2015 at 8:56
  • You need to enable intl in your php.ini file. Instead of php7.0-xsl, try libapache2-mod-php7.0 since xsl is packaged with it.
    – Maddy
    Dec 16, 2015 at 15:59
  • @Maddy so how do one install PHP 7 in production then if not through PPA? Feb 14, 2017 at 17:04
  • @SlavaFominII you could download from php.net/downloads.php and compile from src.
    – Maddy
    Feb 15, 2017 at 21:02
  • you should read this. askubuntu.com/questions/35629/…
    – Mad
    Mar 20, 2017 at 11:33
20

You can run sudo apt-get install php7.0-intl to get it installed. You dont need PPA adding on 16.10 .

0
15

1st you need to add ppa repository to server

this can be done by :

sudo add-apt-repository ppa:ondrej/php

when PPA repo installed, update the local package cache by :

sudo apt-get update

after this you need to run following command to install intl & xsl extensions

sudo apt-get install php7.0-intl
sudo apt-get install php7.0-xsl

check the php extensions by :

php -m

if the extension does load on browser , than you need to check your php.ini for apache2

that can be found by calling <?php phpinfo();?> in info.php file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.