我正在使用Debian9。因此,要编译PHP5.6,我需要旧版本的openssl。 我像这样编译openssl-1.0.1t:
cd /tmp
wget "https://www.openssl.org/source/old/1.0.1/openssl-1.0.1t.tar.gz"
tar xzf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
./config shared --prefix=/opt/openssl
make -j $(nproc) && make install
ln -s /opt/openssl/lib /opt/openssl/lib/x86_64-linux-gnu
wget -O /opt/openssl/ssl/cert.pem "http://curl.haxx.se/ca/cacert.pem"
我得到了openssl,所以我像这样配置了PHP5.6的编译:
./configure --prefix=/opt/PHP/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-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
当我进行制作时,出现此错误:
/usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): In function `ssl_onceonlyinit.part.7':
(.text+0x5d7e): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0
/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0
/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0
/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/lib/x86_64-linux-gnu/libpq.so, may conflict with libssl.so.1.0.0
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libc-client.a(osdep.o): undefined reference to symbol 'TLS_server_method@@OPENSSL_1_1_0'
//usr/lib/x86_64-linux-gnu/libssl.so.1.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:273 : la recette pour la cib
如果我在configure选项中执行--with-imap --with-imap-ssl
,则在制作过程中没有任何问题。我可以安装PHP5.6正常工作,但没有任何IMAP选项。
此致