Linux安装过程中编译PHP时报错
今天在搭建LNMP编译PHP时,报错:configure: error: jpeglib.h not found.本文就和大家分享如何遇到此类问题要怎么解决。
[root@cac3 php-5.6.22]# ./configure \
> --prefix=/usr/local/php5/ \
> --enable-fpm \
> --enable-mbstring \
> --enable-bcmath \
> --enable-sockets \
> --with-config-file-path=/usr/local/php5/etc \
> --with-mysql=/usr/local/mysql/ \
> --with-mysqli=/usr/local/mysql/bin/mysql_con
mysql_config mysql_convert_table_format
mysql_config_editor
> --with-mysqli=/usr/local/mysql/bin/mysql_config \
> --with-gd \
> --with-gettext \
> --with-jpeg-dir
执行上述命令后出现以下报错:
configure: error: jpeglib.h not found.
解决方案如下:
[root@cac3 php-5.6.22]# rpm -qa | grep libjpeg
libjpeg-turbo-1.2.90-5.el7.x86_64
[root@cac3 php-5.6.22]# yum -y install libjpeg-devel
已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
正在解决依赖关系
--> 正在检查事务
---> 软件包 libjpeg-turbo-devel.x86_64.0.1.2.90-5.el7 将被 安装
--> 解决依赖关系完成
......
[root@cac3 php-5.6.22]# yum list installed | grep libjpeg
libjpeg-turbo.x86_64 1.2.90-5.el7 @anaconda/7.4
libjpeg-turbo-devel.x86_64 1.2.90-5.el7 @yaya
[root@cac3 php-5.6.22]# rpm -ql libjpeg-turbo
/usr/lib64/libjpeg.so.62
/usr/lib64/libjpeg.so.62.1.0
/usr/share/doc/libjpeg-turbo-1.2.90
/usr/share/doc/libjpeg-turbo-1.2.90/ChangeLog.txt
/usr/share/doc/libjpeg-turbo-1.2.90/README
/usr/share/doc/libjpeg-turbo-1.2.90/README-turbo.txt
/usr/share/doc/libjpeg-turbo-1.2.90/change.log
/usr/lib/libjpeg.so.62
/usr/lib/libjpeg.so.62.1.0
/usr/share/doc/libjpeg-turbo-1.2.90
/usr/share/doc/libjpeg-turbo-1.2.90/ChangeLog.txt
/usr/share/doc/libjpeg-turbo-1.2.90/README
/usr/share/doc/libjpeg-turbo-1.2.90/README-turbo.txt
/usr/share/doc/libjpeg-turbo-1.2.90/change.log
再次编译即可成功。
相关推荐:
以上就是Linux安装过程中编译PHP时报错的详细内容,更多请关注其它相关文章!
上一篇: VUE页面加载外部HTML实例详解
下一篇: 实现vuex的初始化方法
推荐阅读
-
linux - ubuntu如何编译安装官方php7?
-
phpmyadmin报错原因及解决办法:无法在发生异常时创建会话,请检查 PHP 或网站服务器日志,并正确配置 PHP 安装
-
linux php编译安装,linuxphp编译安装_PHP教程
-
Linux下安装php-soap通过重新编译php过程_PHP教程
-
Linux下编译安装PHP
-
Linux(CentOS)下PHP扩展PDO编译安装的方法
-
Linux 6 下编译安装 PHP 5.6实例详解
-
Linux下手动编译安装PHP扩展的例子分享
-
Linux+php+apache+oracle环境搭建之CentOS下源码编译安装PHP
-
LINUX下编译源码时所需提前安装的常用依赖包列表