Error jpeglib h not found

I am trying to compile php 5.3.29 on Ubuntu 14.04. I am getting an error - configure: error: jpeglib.h not found. Here is my options.sh : #!/bin/bash # You can override config options very easily...

I am trying to compile php 5.3.29 on Ubuntu 14.04. I am getting an error — configure: error: jpeglib.h not found.

Here is my 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

I’ve googled the error but haven’t found a solution that works for me.

All help is appreciated.

EDIT:

Before this I had a line in my options.sh --with-curl . I had to remove it as a temporary fix, since on compiling it asked me to reinstall curl, whereas It is already installed. I tried sudo yum install libcurl-devel, but it said package not found. I did not know the solution so I removed the line as a temporary fix.

Would appreciate if someone could come up with a better solution.

Thanks in advance!

asked Oct 28, 2016 at 14:54

utkarsh2k2's user avatar

I’m not sure if you are using Ubuntu at all. sudo yum install libcurl-devel will not work in Ubuntu.

That said,jpeglib.h is provided by libjpeg-turbo8-dev. So install it using:

sudo apt-get install libjpeg-turbo8-dev

answered Oct 28, 2016 at 17:05

Ron's user avatar

RonRon

20.2k6 gold badges55 silver badges72 bronze badges

4

libjpeg-turbo8-dev doesn’t work anymore. It is changed to:

sudo apt-get install libjpeg62-turbo-dev

answered Mar 4, 2021 at 19:36

Player1's user avatar

Trying to build from the official php:7.1-fpm-alpine image, using the following excerpt in my Dockerfile:

FROM php:7.1-fpm-alpine

RUN set -ex 
    apk add --no-cache --virtual .build-deps 
    freetype-dev 
    libjpeg-turbo-dev 
    libpng-dev 

    && docker-php-ext-configure gd 
        --with-freetype-dir=/usr 
        --with-png-dir=/usr 
        --with-jpeg-dir=/usr 
    && docker-php-ext-install gd 
    && apk del .build-deps

When attempting to build this with docker build, GD fails during ./configure with the following error:

configure: error: jpeglib.h not found

I can confirm that jpeglib.h exists and is exactly where I think it should be (indeed, exactly where it is in Debian variants):

$ docker run -it --rm php:7.1-fpm-alpine /bin/sh
>$ apk add --no-cache libjpeg-turbo-dev 
   && find /usr -type f -name 'jpeglib.h'
   ...
   /usr/include/jpeglib.h

But if I take exactly the same command used in the dockerfile and run it interactively inside the container, it builds flawlessly. No errors.

Is this a bug, or am I missing something?

Debian php build errors and solutions

configure: error: xml2-config not found. Please check your libxml2 installation.

# apt-get install libxml2 libxml2-dev

configure: error: Cannot find OpenSSL’s libraries

# apt-get install libssl-dev

и добавить опцию конфигурирования:

--with-libdir=/lib/x86_64-linux-gnu

configure: error: Please reinstall the BZip2 distribution

# apt-get install libbz2-dev

checking for cURL in default path… not found
configure: error: Please reinstall the libcurl distribution —
easy.h should be in <curl-dir>/include/curl/

# apt-get install libcurl4-openssl-dev

configure: error: jpeglib.h not found.

# apt-get install libjpeg-dev

configure: error: png.h not found.

# apt-get install libpng12-dev

configure: error: freetype.h not found.

# apt-get install libfreetype6-dev

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

# apt-get install libmcrypt-dev

checking for MySQL support… yes
checking for specified location of the MySQL UNIX socket… no
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!

# apt-get install libmysqlclient-dev

Попытка построить из официального изображения php:7.1-fpm-alpine, используя следующий фрагмент в моем файле Docker:

FROM php:7.1-fpm-alpine

RUN set -ex 
    apk add --no-cache --virtual .build-deps 
    freetype-dev 
    libjpeg-turbo-dev 
    libpng-dev 

    && docker-php-ext-configure gd 
        --with-freetype-dir=/usr 
        --with-png-dir=/usr 
        --with-jpeg-dir=/usr 
    && docker-php-ext-install gd 
    && apk del .build-deps

При попытке построить это с помощью docker build GD завершится с ошибкой во время ./configure со следующей ошибкой:

configure: error: jpeglib.h not found

Я могу подтвердить, что jpeglib.h существует, и именно там, где я думаю, он должен быть (действительно, именно там, где он находится в вариантах Debian):

$ docker run -it --rm php:7.1-fpm-alpine /bin/sh
>$ apk add --no-cache libjpeg-turbo-dev 
   && find /usr -type f -name 'jpeglib.h'
   ...
   /usr/include/jpeglib.h

Но если я возьму ту же самую команду, которая используется в файле docker, и выполняю ее интерактивно внутри контейнера, она работает безупречно. Нет ошибок.

Является ли это ошибкой, или я чего-то не хватает?

Common php compile errors and the corresponding missing lib

Some of the package only available if you have set up epel for additional yum repo.

configure: error: Please reinstall the sqlite distribution from http://www.sqlite.org
$ yum install sqlite-devel.x86_64

configure: error: freetype-config not found.
$ yum install freetype-devel.x86_64 freetype.x86_64

configure: error: libXpm.(a|so) not found.
$ yum install libXpm-devel.x86_64 libXpm.x86_64

configure: error: jpeglib.h not found.
$ yum install libjpeg-devel.x86_64
or for centOS 6.x
$ yum install libjpeg-turbo.x86_64 libjpeg-turbo-devel.x86_64

configure: error: png.h not found.
$ yum install libpng-devel.x86_64

configure: error: Unable to locate gmp.h
$ yum install gmp-devel.x86_64

configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
$ yum install libc-client-devel.x86_64

configure: WARNING: continuing without libevent support
$ yum install libevent-devel.x86_64

configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
# you may find that you have the lic-client-devel.x86_64 installed but configure still complains, and it seems, we need
# the i686 version. or we can use –with-libdir=lib64 without install the i686 package
$ yum install libc-client-devel.i686

configure: error: Kerberos libraries not found.
# you find you have the 64bits version installed, but configure still complains
# install the i686 version too or we can use –with-libdir=lib64 without install the i686 package
$ yum install krb5-devel.i686

configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
$ yum install libicu-devel.x86_64

configure: error: installation or configuration problem: C++ compiler cannot create executables.
$ yum install gcc-c++.x86_64

configure: error: Cannot find ldap.h
$ yum install openldap-devel.x86_64

configure: error: Cannot find ldap libraries in /usr/lib.
# on our 64 bits system, it needs something still in /usr/lib
# or we can use –with-libdir=lib64 without install the i686 package
$ yum install openldap-devel.i686

configure: error: mcrypt.h not found. Please reinstall libmcrypt.
$ yum install libmcrypt-devel.x86_64

mysql_config not found
# find out where mysql_config is and add –with-mysqli=/usr/bin/mysql_config

configure: error: Cannot find pspell
$ yum install aspell-devel.x86_64

configure: error: Cannot find libtidy
$ yum install libtidy-devel.x86_64

configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
$ yum install libxslt-devel.x86_64

configure: error: Please reinstall the BZip2 distribution
$ yum install bzip2-devel.x86_64

configure: error: Cannot find libsphinxclient headers

configure: error: xml2-config not found. Please check your libxml2 installation.
$ yum install libxml2-devel.x86_64

configure: error: Cannot find OpenSSL’s
$ yum install openssl-devel.x86_64

checking for PCRE headers location… configure: error: Could not find pcre.h in /usr
$ yum install pcre-devel.x86_64

configure: error: Please reinstall the libcurl distribution –
easy.h should be in /include/curl/

$ yum install libcurl-devel.x86_64

configure: error: Unable to detect ICU prefix or shared,/usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.
$ yum install icu.x86_64 libicu-devel.x86_64

configure: error: C++ preprocessor “/lib/cpp” fails sanity check
$ yum install gcc-c++.x86_64

checking for libmemcached location… configure: error: memcached support requires libmemcached. Use –with-libmemcached-dir=xxx to specify the prefix where libmemcached headers and library are located
$ yum install libmemcached.x86_64
and add “–with-libmemcached-dir=/usr” to configure cmd

checking for libmemcached location… configure: error: Unable to find memcached.h under /usr
$ yum install libmemcached-devel.x86_64

configure: error: no, libmemcached sasl support is not enabled. Run configure with –disable-memcached-sasl to disable this check
fix: let us go without SASL support by adding “–disable-memcached-sasl”
later we could build a memcached with SASL enabled and revisit this issue

configure: error: Cannot find enchant
$ yum install enchant.x86_64 enchant-devel.x86_64 enchant-aspell.x86_64

configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
fix:
$ yum install mysql-libs.x86_64 mysql-devel.x86_64

configure: error: mysql configure failed. Please check config.log for more information.
conftest.c:36: undefined reference to `pthread_mutexattr_init’
conftest.c:37: undefined reference to `pthread_create’
fix:
This issue is similar the issue above. however in our case, we are using mysql.com latest mysql 5.6.22 RPM and there are something broken in
our env. and our fix is to build php 5.4.36 with the yum mysql client lib and dev lib.

configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
$ yum install postgresql-libs.x86_64 postgresql-devel.x86_64

checking for sqlite3 files in default path… not found
configure: error: Please reinstall the sqlite3 distribution
$ yum install sqlite-devel.x86_64

configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.
$ yum install net-snmp-devel.x86_64 net-snmp-libs.x86_64

configure: error: Please install pecl/raphf and activate extension=raphf.so in your php.ini
$ yum install php-pecl-raphf-devel.x86_64 php-pecl-propro-devel.x86_64
still can not compile. we may have to leave pecl_http for later using pecl?

configure: WARNING: unrecognized options: –enable-magic-quotes, –with-sqlite
fix: these are no longer valid for php 5.4+, just remove these options.

ext/pecl_http/config.m4:5: warning: file `config9.m4′ included several times
fix: rename it to “http” which is the official ext name, though the downloaded ext file name is pecl_http

Понравилась статья? Поделить с друзьями:
  • Error java lang verifyerror bad type on operand stack код завершения 1
  • Error java lang securityexception package android does not belong to 2000
  • Error java lang securityexception caller uid
  • Error job was stopped due to backup window setting
  • Error job for kesl supervisor service failed because the control process exited with error code