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

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

WBOY
Lepaskan: 2016-07-29 09:09:10
asal
4696 orang telah melayarinya
如何解决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教程有兴趣的朋友有所帮助。

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan