码迷,mamicode.com
首页 > Web开发 > 详细

ARM交叉编译PHP

时间:2020-11-17 12:31:59      阅读:21      评论:0      收藏:0      [点我收藏+]

标签:x86   bin   www   clu   har   安装php   class   isa   director   

php+php 所需扩展库 交叉编译

安装依赖:

libxml2:

1.	wget ftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gz
2.  tar xvf libxml2-2.7.2.tar.gz
3.  cd libxml2-2.7.2
4.  ./configure CC=aarch64-linux-gnu-gcc --host=aarch64-linux-gnu --prefix=/usr/local/libxml2 -without-python
5.  make && make install

报错如下:

1、configure: error: /bin/sh ./config.sub x86_64-unknown-linux-gnu failed
/usr/share/libtool/config/config.sub 与 /usr/share/libtool/config/config.guss 复制到要进行编译的目录
2、/usr/include/python2.7/pyconfig.h:45:35: fatal error: python2.7/pyconfig-64.h: No such file or directory 增加 -without-python 选项

zlib

1.wget http://www.zlib.net/fossils/zlib-1.2.9.tar.gz
2.tar -zxvf zlib-1.2.9.tar.gz
3.export CC=aarch64-linux-gnu-gcc
4./configure --prefix=install-dir
5.make && make install

安装PHP:

CC=aarch64-linux-gnu-gcc ./configure  --host=aarch64-linux-gnu --prefix=/usr/local/php --disable-cli --disable-fileinfo --disable-opcache --enable-shared --enable-pdo --with-libxml-dir=/usr/local/libxml2 --with-zlib-dir=/usr/local/zlib --without-iconv --with-sqlite 

安装PHP拓展:

以redis.so为例

1.wget http://pecl.php.net/get/redis-2.2.7.tgz
2.tar -xvf redis-2.2.7.tgz
3.cd redis-2.2.7.tgz
4./usr/local/php/bin/phpize 
5. ./configure CC=aarch64-linux-gnu-gcc --host=aarch64-linux-gnu --with-php-config=/usr/local/php/bin/php-config
6.make && make install

ARM交叉编译PHP

标签:x86   bin   www   clu   har   安装php   class   isa   director   

原文地址:https://www.cnblogs.com/jmtang/p/13959898.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!