php: compilando com o openssl, ftp, ldap, suporte de curl no debian gnu / linux

1

Estou tentando compilar o php 5.2.x no debian gnu / linux:

./configure --with-ldap --enable-ftp --with-apxs2 --with-mcrypt --enable-bcmath --with-bz2 --enable-calendar --enable-dba=shared --enable-exif --with-gettext --enable-mbstring --with-mhash --with-readline --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-wddx --enable-zip --with-zlib --with-xsl

make

funciona perfeito, mas eu preciso enrolar:

./configure --with-ldap --enable-ftp --with-apxs2 --with-mcrypt --enable-bcmath --with-bz2 --enable-calendar --enable-dba=shared --enable-exif --with-gettext --enable-mbstring --with-mhash --with-readline --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-wddx --enable-zip --with-zlib --with-xsl --with-curl

make

erro:

/usr/bin/ld: ext/curl/.libs/interface.o: undefined reference to symbol 'CRYPTO_set_id_callback@@OPENSSL_1.0.0' /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:241: recipe for target 'sapi/cli/php' failed

dpkg -l | grep openssl

ii libcurl4-openssl-dev:amd64 7.38.0-4+deb8u5
amd64 development files and documentation for libcurl (OpenSSL flavour)

ii libgnutls-openssl27:amd64 3.3.8-6+deb8u3
amd64 GNU TLS library - OpenSSL wrapper

ii openssl 1.0.1t-1+deb8u5
amd64 Secure Sockets Layer toolkit - cryptographic utility

dpkg -l | grep curl

ii curl 7.38.0-4+deb8u5
amd64 command line tool for transferring data with URL syntax

ii libcurl3:amd64 7.38.0-4+deb8u5
amd64 easy-to-use client-side URL transfer library (OpenSSL flavour)

ii libcurl3-gnutls:amd64 7.38.0-4+deb8u5
amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)

ii libcurl4-openssl-dev:amd64 7.38.0-4+deb8u5
amd64 development files and documentation for libcurl (OpenSSL flavour)

UPDATE : o erro é sobre FTP com suporte ao openssl:

./configure --with-openssl --enable-ftp

make

ext/openssl/openssl.o: In function 'zm_startup_openssl':
/usr/src/php-5.2.17/ext/openssl/openssl.c:681: undefined reference to 'SSL_library_init'
...
collect2: error: ld returned 1 exit status
Makefile:228: recipe for target 'sapi/cli/php' failed
make: *** [sapi/cli/php] Error 1
    
por ZiTAL 28.11.2016 / 16:11

1 resposta

2

O problema foi openssl, bem, eu instalei o openssl 0.9.8 de fonte :

Mova para /usr/src e compile-o sem man pages devido a um erro:

./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl no-asm -fPIC

make

make install_sw

Então eu compilo php com essas opções:

./configure --with-openssl=/usr/local/openssl --with-openssl-dir=/usr/local/openssl --with-curl --enable-ftp --with-ldap --with-apxs2 --enable-bcmath --with-bz2 --enable-calendar --enable-exif --enable-mbstring --with-mhash --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-zip --with-zlib

make

ATUALIZAÇÃO: funciona também para 5.6.28

    
por 29.11.2016 / 11:58