安装 PHP 7 后如何安装/启用 intl 和 xsl 扩展
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34294852/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install/enable intl and xsl extensions after installing PHP 7
提问by Henry
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).
我安装php7/apache2.4/mysql5.6
通过这个脚本,但事实证明,扩展xsl
和intl
失踪(需要它们运行Magento2)。
I'm using Ubuntu 14.04.
我正在使用 Ubuntu 14.04。
回答by Maddy
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 NEVERbe used in production.
如果仅用于开发目的,最简单的方法是使用 PPA 之类的ppa:ondrej/php-7.0
,然后是apt-get install php7.0-intl
和apt-get install php7.0-xsl
。PPA绝不应用于生产。
回答by Mad
You can run sudo apt-get install php7.0-intl
to get it installed.
You dont need PPA
adding on 16.10 .
您可以运行sudo apt-get install php7.0-intl
以安装它。您不需要PPA
在 16.10 上添加。
回答by Emizen Tech
1st you need to add ppa repository to server
第一,您需要将 ppa 存储库添加到服务器
this can be done by :
这可以通过以下方式完成:
sudo add-apt-repository ppa:ondrej/php
when PPA repo installed, update the local package cache by :
安装 PPA repo 后,通过以下方式更新本地包缓存:
sudo apt-get update
after this you need to run following command to install intl & xsl extensions
在此之后,您需要运行以下命令来安装 intl 和 xsl 扩展
sudo apt-get install php7.0-intl
sudo apt-get install php7.0-xsl
check the php extensions by :
通过以下方式检查php扩展:
php -m
if the extension does load on browser , than you need to check your php.ini for apache2
如果扩展程序确实加载到浏览器上,那么您需要检查您的 php.ini 以获取 apache2
that can be found by calling <?php phpinfo();?>
in info.phpfile
可以通过调用发现<?php phpinfo();?>
在info.php的文件