Ubuntu编译PHP7问题
2016-06-11 11:05
603 查看
安装编译依赖
编译选项
具体的configure参数信息可以通过
查看到
开始编译安装
提示缺少apxs:
在Ubuntu中,采用
安装apache服务后,是不会带Apxs,需要安装 apache2-dev。其命令是:
安装完后查看安装的路径:find / -name 'apxs2'
然后继续使用--with-openssl 不用带路径
configure: error: freetype-config not found.
解决办法如下:
configure: error: Cannot find ldap libraries in /usr/lib
把 /usr/lib/x86..../目录下的libldap*文件拷贝到 /usr/lib
configure: error: Can not find recode.h anywhere under yes /usr/local /usr /opt
Linux下编译软件如果遇到can not find 问题大多可以通过
来查找的然后安装既可以,最后PHP7就安装好了。
![](https://images2015.cnblogs.com/blog/717692/201606/717692-20160611121542449-1869925207.png)
可以参考:http://jcutrer.com/howto/linux/how-to-compile-php7-on-ubuntu-14-04
sudo apt-get -y install build-essential git autoconf sudo apt-get build-dep php5 sudo apt-get -y install libt1-dev libgmp-dev bison sudo apt-get -y install mysql-server mysql-client libmysqlclient-dev apt-get install libfcgi-dev libfcgi0ldbl ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
编译选项
./configure --prefix=/usr --with-config-file-path=/etc --enable-mbstring --enable-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-curl --with-mcrypt --with-iconv --with-gmp --with-pspell --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --with-t1lib=/usr --enable-gd-native-ttf --enable-gd-jis-conv --with-openssl --with-pdo-mysql=/usr --with-gettext=/usr --with-zlib=/usr --with-bz2=/usr --with-recode=/usr --with-mysqli=/usr/bin/mysql_config --with-apxs2=/usr/bin/apxs2
具体的configure参数信息可以通过
./configure --help
查看到
开始编译安装
make && make install
提示缺少apxs:
在Ubuntu中,采用
sudo apt-get install apache2
安装apache服务后,是不会带Apxs,需要安装 apache2-dev。其命令是:
sudo apt-get install apache2-dev
安装完后查看安装的路径:find / -name 'apxs2'
configure: error: Cannot find OpenSSL's <evp.h>
sudo apt-get install libcurl4-openssl-dev pkg-config
然后继续使用--with-openssl 不用带路径
configure: error: freetype-config not found.
解决办法如下:
apt-get -y install libfreetype6-dev
configure: error: Cannot find ldap libraries in /usr/lib
把 /usr/lib/x86..../目录下的libldap*文件拷贝到 /usr/lib
cp /usr/lib/x86_64-linux-gnu/libldap* /usr/lib
configure: error: Can not find recode.h anywhere under yes /usr/local /usr /opt
sudo apt-get install [code]librecode-dev
Linux下编译软件如果遇到can not find 问题大多可以通过
sudo apt list '*缺少的文件名*‘
来查找的然后安装既可以,最后PHP7就安装好了。
![](https://images2015.cnblogs.com/blog/717692/201606/717692-20160611121542449-1869925207.png)
可以参考:http://jcutrer.com/howto/linux/how-to-compile-php7-on-ubuntu-14-04
相关文章推荐
- laravel框架中所蕴含的两个重要的面向对象设计模式
- Vsftpd软件包的获取与安装
- PHP 加密的几种方式
- PHP手工注入
- ubuntu 下NetworkX,matplotlib的安装和使用(转)
- 用ftplib爆破FTP口令
- PHP学习笔记-数组
- Yii2高级模版使用composer在windows系统上安装
- php设计模式之单例模式代码
- PHP学习笔记——延迟静态绑定
- 围观tp驱动保护。详解debugport清0
- laravel配置路由出现404解决办法
- PHP 字符串的隐式转换规则以及针对包含字母的字符串的递增/递减操作
- php设计模式之单例模式代码
- PHP中strpos、strstr和stripos、stristr函数分析
- Ajax获取PHP服务器上的 Json数据以及POST的综合实例
- thinkphp整合系列之友盟消息推送
- PHP7安装
- Windows 2008一键安装包配置环境:Windows+IIS+Php+Mysql
- windows 2008手动安装PHP环境