0

I want to install PHP 5.6 in Debian Jessie and I'm following the procedures listed in this page (the server is using ISPConfig and I want to add this PHP version to the list of PHP versions available).

When I run:

./configure --prefix=/opt/php-5.6 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl=/opt/openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

I get the following error:

checking for GNU gettext support... yes
checking for bindtextdomain in -lintl... no
checking for bindtextdomain in -lc... no
configure: error: Unable to find required gettext library

The thing is I have gettext installed and I do not know how to go on with this. Any feedback would be much appreciated.

  • I know it might not be your choice but I couldn't advise you to continue using ISPConfig, if you want a simple system don't use that monstrosity overkill featureful monster, I might have things wrong but I walways find it way too complex for a simple hosting serveur – Kiwy Mar 12 '18 at 9:21
  • The reasons you are against ISPConfig is due to its complexity? Performance? What other options do you recommend instead of ISPConfig? – Mike Alvim Mar 12 '18 at 11:18
  • Well I would consider building a small script that deploy a standard configuration on the server. But that's opinion base, My experience with ISPConfig is very confuse as this do a lot of things I don't understand and the documentation is not really exhaustive (the complete installation procedure is not even on their website) – Kiwy Mar 12 '18 at 11:23
  • I'm very familiar with ISPConfig but thanks for sharing your experience. Cheers. – Mike Alvim Mar 13 '18 at 11:54
2

Please make sure you've installed the following packages:

# apt-get install libxml2-dev libz-dev libbz2-dev libcurl4-openssl-dev libmcrypt-dev libpq-dev libxslt-dev

I've tried the configuration command within a Docker container [1] and the command finished successfully. Mind

  • the change in ./configure command: --with-openssl=/opt/openssl was removed
  • the absence of gettext package

[1] Dockerfile for configuring PHP 5.6 within Debian Jessie (directives are split to emphasize the order for each required package but a condensed form [2] would have work the same)

FROM debian:jessie                                                                                                                                                                         

RUN apt-get update

RUN apt-get install -y wget

RUN wget http://de2.php.net/get/php-5.6.33.tar.bz2/from/this/mirror -O php-5.6.33.tar.bz2

RUN apt-get install -y bzip2

RUN tar jxf ./php-5.6.33.tar.bz2

RUN apt-get install -y gcc

RUN apt-get install -y libxml2-dev

RUN apt-get install -y libz-dev

RUN apt-get install -y libbz2-dev

RUN apt-get install -y libcurl4-openssl-dev

RUN apt-get install -y libmcrypt-dev

RUN apt-get install -y libpq-dev

RUN apt-get install -y libxslt-dev

RUN cd php-5.6.33 && ./configure --prefix=/opt/php-5.6 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

[2] Condensed Dockerfile for configuring PHP 5.6 within Debian Jessie

FROM debian:jessie                                                                                                                                                                         

RUN apt-get update && \
  apt-get install -y wget bzip2 gcc libxml2-dev libz-dev libbz2-dev libcurl4-openssl-dev libmcrypt-dev libpq-dev libxslt-dev && \
  wget http://de2.php.net/get/php-5.6.33.tar.bz2/from/this/mirror -O php-5.6.33.tar.bz2 && \
  tar jxf ./php-5.6.33.tar.bz2 && \
  cd php-5.6.33 && ./configure --prefix=/opt/php-5.6 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
  • Thanks a lot Matheus. It's now working. The problem seems to be with the extra --with-openssl command. – Mike Alvim Mar 13 '18 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.