Ubuntu编译PHP7问题
安装编译依赖
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 librecode-dev
Linux下编译软件如果遇到can not find 问题大多可以通过
sudo apt list '*缺少的文件名*‘
来查找的然后安装既可以,最后PHP7就安装好了。

可以参考:http://jcutrer.com/howto/linux/how-to-compile-php7-on-ubuntu-14-04
Ubuntu编译PHP7问题的更多相关文章
- Ubuntu编译安装php7.4
Ubuntu编译安装php7.4 [root@ubuntu2004 php-7.4.30]#apt install gcc libssl-dev libxml2-dev libsqlite3-dev ...
- TODO:macOS编译PHP7.1
TODO:macOS编译PHP7.1 本文主要介绍在macOS上编译PHP7.1,有兴趣的朋友可以去尝试一下. 1.下载PHP7.1源码,建议到PHP官网下载纯净到源码包php-7.1.0.tar.g ...
- Ubuntu 编译安装 Linux 4.0.5 内核,并修复 vmware 网络内核模块编译错误
. . . . . 今天把 Ubuntu 14.04 升级到了最新的 4.0.5 的内核版本,本来不打算记录下来的,但是升级的过程中确实遇到了一些问题,所以还是记录下来,分享给遇到同样问题的猿友. 先 ...
- linux 解决Ubuntu编译内核uImage出现问题“mkimage” command not found - U-Boot images will not be built问题
解决Ubuntu编译内核uImage出现问题“mkimage” command not found - U-Boot images will not be built问题 http://www.lin ...
- ubuntu 编译运行 opencv C++ 项目
ubuntu 编译运行 opencv C++ 项目 环境 ubuntu 16.04 opencv3.4.0 一. 编译方法 1)命令行 g++ imageResize.cpp -o resize `p ...
- windows下编译php7图形库php_ui.dll
CSDN博客 具有图形化编程才有意思,这几天看到了php ui 图形扩展,只是现在只能下载php 7.1的 本次教程编译php7.2.6的 php ui 要是linux下编译起来比较简单 但是 win ...
- Ubuntu编译安装nginx,php,mysql
摘要: 整理的Ubuntu编译安装nginx,php,mysql的步骤,主要来自对驻云的sh-1.4.1中脚本的整理,随时代进步,内容中的软件或者命令请自行更新 目录准备 创建用户 userdel w ...
- Ubuntu 编译安装 nginx
有关博客: <Windows 编译安装 nginx 服务器 + rtmp 模块>.<Ubuntu 编译安装 nginx>.<Arm-Linux 移植 Nginx> ...
- Ubuntu编译安装PHP7
参数配置 ./configure --prefix=/usr/local/php7 \ --with-config-file-path=/usr/local/php7/etc \ --with-apx ...
随机推荐
- 【Alpha版本】 第八天 11.16
一.站立式会议照片: 二.项目燃尽图: 三.项目进展: 成 员 昨天完成任务 今天完成任务 明天要做任务 问题困难 心得体会 胡泽善 完成我要应聘的列表显示,完成账户信息设置界面 完成我要应聘的详情显 ...
- centos 6 安装
centos 6 安装步骤 说明: 1.install or upgrade an existing system安装或升级现有系统 2.install system with basic vide ...
- python requests
快速上手http://docs.python-requests.org/zh_CN/latest/user/quickstart.html Requests 是使用 Apache2 Licensed ...
- 简单的angular表单验证指令
<html ng-app="myApp"> <head> <meta charset="UTF-8"> <title& ...
- HTML CSS + DIV实现整体布局
HTML CSS + DIV实现整体布局 1.技术目标: 开发符合W3C标准的Web页面 理解盒子模型 实现DIV+CSS整体布局 2.什么是W3C标准? W3C:World Wide Web Con ...
- sql 行转 列, 列转行
行列互转 复制代码 create table test(id ),quarter int,profile int) insert into test values(,,) insert into te ...
- WSAStartup
WSAStartup,是Windows Sockets Asynchronous的启动命令.Windows下的网络编程接口软件 Winsock1 或 Winsock2 里面的一个命令. 外文名 WSA ...
- easyUI中tree的简单使用
一.在JS中的代码 $('#tt').tree({ url: baseCtx + 'lib/easyui-1.4/demo/tree/tree_data1.json',//tree数据的来源,json ...
- pulltorefresh滚动到底部
如果用ListView,让它滚动到顶部,一般是这样写的: if (!listView.isStackFromBottom()) { listView.setStackFromBottom(true); ...
- ecshop上传图片2
html代码 <tr> <td class="label">{$lang.lab_picture}</td> <td> <in ...