首页 > 后端开发 > php教程 > 如何解决magento2安装过程中缺少两个php扩展的问题:ext-intl和ext-xsl

如何解决magento2安装过程中缺少两个php扩展的问题:ext-intl和ext-xsl

WBOY
发布: 2016-07-29 09:09:10
原创
4696 人浏览过
如何解决magento2安装过程中缺少两个php扩展的问题:ext-intl和ext-xsl
问题现象:
[root@localhost magento2]# pwd
/home/wwwroot/default/magento2
[root@localhost magento2]# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to 
update them.
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
  Problem 2
    - The requested PHP extension ext-xsl * is missing from your system. Install or enable PHP's xsl extension.
解决问题:
进入cd /home/freeman/tools/lnmp1.2-full/src/php-5.6.9/ext/intl/
执行$phpize && ./configure --with-php-c/local/php/bin/php-config && make && make install
在这个configure的过程中会出现错误,安装相应的lib就行。
$yum install libicu-devel -y
$yum install libxslt-devel -y
cd /home/freeman/tools/lnmp1.2-full/src/php-5.6.9/ext/xsl/
$phpize && ./configure --with-php-c/local/php/bin/php-config && make && make install
修改php.ini
$vi /usr/local/php/etc/php.ini
增加:
extension=xsl.so
extension=intl.so
然后重启php服务/etc/init.d/php-fpm restart
再回到/home/wwwroot/magento2下面执行
$composer install
[root@localhost magento2]# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing magento/magento-composer-installer (0.1.5)
    Downloading: 100%         
  - Installing braintree/braintree_php (2.39.0)
    Downloading: 100%         
这样就成功了。

以上就介绍了如何解决magento2安装过程中缺少两个php扩展的问题:ext-intl和ext-xsl,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板