配置:错误:未找到jpeglib.h

配置:错误:未找到jpeglib.h

我正在尝试在 Ubuntu 14.04 上编译 php 5.3.29。我收到一个错误 -configure: error: jpeglib.h not found.

这是我的options.sh

#!/bin/bash
# You can override config options very easily.
# Just create a custom options file; it may be version specific:
# - custom-options.sh
# - custom-options-5.sh
# - custom-options-5.3.sh
# - custom-options-5.3.1.sh
#
# Don't touch this file here - it would prevent you to just "svn up"
# your phpfarm source code.

version=$1
vmajor=$2
vminor=$3
vpatch=$4

#gcov='--enable-gcov'
configoptions="\
--enable-bcmath \
--with-mysqli \
--with-png \
--with-gd \
--enable-gd-native-ttf \
--enable-calendar \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-pcntl \
--enable-soap \
--with-pdo-mysql \
--enable-sockets \
--enable-sqlite-utf8 \
--enable-wddx \
--enable-zip \
--with-openssl \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-freetype-dir=/urs/lib \
--with-zlib \
--with-gettext \
--with-mcrypt \
--with-bz2 \
--with-mysql=/usr \
$gcov"

echo $version $vmajor $vminor $vpatch

我已经在 Google 上搜索过该错误,但没有找到适合我的解决方案。

非常感谢您的帮助。

编辑:

在此之前,我的 options.sh 中有一行--with-curl \。我不得不将其删除作为临时修复,因为在编译时它要求我重新安装 curl,而它已经安装了。我试过了sudo yum install libcurl-devel,但它说找不到包。我不知道解决方案,所以我删除了该行作为临时修复。

如果有人能提出更好的解决方案我将不胜感激。

提前致谢!

答案1

我不确定您是否在使用 Ubuntu。sudo yum install libcurl-devel在 Ubuntu 中无法工作。

也就是说,jpeglib.h由 提供libjpeg-turbo8-dev。因此使用以下命令安装它:

sudo apt-get install libjpeg-turbo8-dev

答案2

libjpeg-turbo8-dev不再起作用。它被改为:

sudo apt-get install libjpeg62-turbo-dev

相关内容