Debian
無法在 Debian 8 中編譯 PHP 5.6
我想在 Debian Jessie 中安裝 PHP 5.6,並按照此頁面中列出的程序進行操作(伺服器正在使用 ISPConfig,我想將此 PHP 版本添加到可用的 PHP 版本列表中)。
當我執行時:
./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
我收到以下錯誤:
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
問題是我已經安裝了 gettext,但我不知道該怎麼做。任何回饋將不勝感激。
請確保您已安裝以下軟體包:
# apt-get install libxml2-dev libz-dev libbz2-dev libcurl4-openssl-dev libmcrypt-dev libpq-dev libxslt-dev
我已經在 Docker 容器中嘗試了配置命令
$$ 1 $$並且命令成功完成。頭腦
- 命令的更改
./configure
:--with-openssl=/opt/openssl
已刪除- 沒有
gettext
包裹$$ 1 $$用於在 Debian Jessie 中配置 PHP 5.6 的 Dockerfile(指令被拆分以強調每個所需包的順序,但採用壓縮形式$$ 2 $$會有同樣的工作)
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 $$用於在 Debian Jessie 中配置 PHP 5.6 的精簡 Dockerfile
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