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.

Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102
Henry
  • 593
  • 2
  • 5
  • 12

3 Answers3

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.

Maddy
  • 996
  • 8
  • 18
  • 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 '15 at 08: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 '15 at 15:59
  • @Maddy so how do one install PHP 7 in production then if not through PPA? – Slava Fomin II Feb 14 '17 at 17:04
  • @SlavaFominII you could download from http://php.net/downloads.php and compile from src. – Maddy Feb 15 '17 at 21:02
  • you should read this. http://askubuntu.com/questions/35629/are-ppas-safe-to-add-to-my-system-and-what-are-some-red-flags-to-watch-out-fo – Mad Mar 20 '17 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 .

Mad
  • 538
  • 1
  • 10
  • 27
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

Emizen Tech
  • 3,529
  • 1
  • 17
  • 33