Magento 编译 php5.6.21 命令

./configure  '--prefix=/alidata/server/php' '--enable-opcache' '--with-config-file-path=/alidata/server/php/etc' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--enable-fpm' '--enable-static' '--enable-inline-optimization' '--enable-sockets' '--enable-wddx' '--enable-zip' '--enable-calendar' '--enable-bcmath' '--enable-soap' '--with-zlib' '--with-iconv=/usr/local' '--with-gd' '--with-xmlrpc' '--enable-mbstring' '--with-curl' '--enable-ftp' '--with-mcrypt' '--with-freetype-dir=/usr/local/freetype.2.1.10' '--with-jpeg-dir=/usr/local/jpeg.6' '--with-png-dir=/usr/local/libpng.1.2.50' '--disable-ipv6' '--disable-debug' '--with-openssl' '--disable-maintainer-zts' '--disable-fileinfo' '--enable-intl' '--enable-cgi' '--with-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教程有兴趣的朋友有所帮助。


 

 

Usage: /usr/local/bin/php-config [OPTION]
Options:
  --prefix            [/usr/local/Cellar/php55/5.5.35]
  --includes          [-I/usr/local/Cellar/php55/5.5.35/include/php -I/usr/local/Cellar/php55/5.5.35/include/php/main -I/usr/local/Cellar/php55/5.5.35/include/php/TSRM -I/usr/local/Cellar/php55/5.5.35/include/php/Zend -I/usr/local/Cellar/php55/5.5.35/include/php/ext -I/usr/local/Cellar/php55/5.5.35/include/php/ext/date/lib]
  --ldflags           [ -L/usr/local/Cellar/libxml2/2.9.3/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/jpeg/lib -L/usr/local/opt/libpng/lib -L/usr/local/Cellar/freetype/2.6.3/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/unixodbc/lib]
  --libs              [  -lcrypto -lssl -lcrypto -lz -lexslt -lresolv -ledit -lncurses -lldap -llber -liconv -liconv -lintl -lpng -lz -ljpeg -lcrypto -lssl -lcrypto -lcurl -lbz2 -lz -lcrypto -lssl -lcrypto -lm  -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lxml2 -lz -liconv -lm -lfreetype -lodbc -lodbc -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lxslt ]
  --extension-dir     [/usr/local/Cellar/php55/5.5.35/lib/php/extensions/no-debug-non-zts-20121212]
  --include-dir       [/usr/local/Cellar/php55/5.5.35/include/php]
  --man-dir           [/usr/local/Cellar/php55/5.5.35/share/man]
  --php-binary        [/usr/local/Cellar/php55/5.5.35/bin/php]
  --php-sapis         [ apache2handler cli fpm cgi]
  --configure-options [--prefix=/usr/local/Cellar/php55/5.5.35 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.5 --with-config-file-path=/usr/local/etc/php/5.5 --with-config-file-scan-dir=/usr/local/etc/php/5.5/conf.d --mandir=/usr/local/Cellar/php55/5.5.35/share/man --enable-bcmath --enable-calendar --enable-dba --enable-exif --enable-ftp --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zip --with-freetype-dir=/usr/local/opt/freetype --with-gd --with-gettext=/usr/local/opt/gettext --with-iconv-dir=/usr --with-icu-dir=/usr/local/opt/icu4c --with-jpeg-dir=/usr/local/opt/jpeg --with-kerberos=/usr --with-libedit --with-mhash --with-ndbm=/usr --with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc --with-png-dir=/usr/local/opt/libpng --with-unixODBC=/usr/local/opt/unixodbc --with-xmlrpc --with-zlib=/usr --with-readline=/usr/local/opt/readline --without-gmp --without-snmp --with-libxml-dir=/usr/local/opt/libxml2 --with-apxs2=/usr/sbin/apxs --libexecdir=/usr/local/Cellar/php55/5.5.35/libexec --with-bz2=/usr --disable-debug --with-openssl=/usr/local/opt/openssl --enable-fpm --with-fpm-user=_www --with-fpm-group=_www --with-curl --with-xsl=/usr --with-ldap --with-ldap-sasl=/usr --with-mysql-sock=/tmp/mysql.sock --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --disable-opcache --enable-pcntl --without-pear --enable-dtrace --enable-zend-signals]
  --version           [5.5.35]
  --vernum            [50535]

转载于:https://www.cnblogs.com/linuxOS/p/5507574.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值