Phpbrew: unable to install php. 5.3.29 getting error

Created on 15 Dec 2016  路  4Comments  路  Source: phpbrew/phpbrew

Output

/usr/bin/ld: warning: libssl.so.1.0.0, needed by /usr/lib/i386-linux-gnu/libcurl.so, may conflict with libssl.so.1.0.2
/usr/bin/ld: ext/openssl/xp_ssl.o: undefined reference to symbol 'SSLv3_server_method@@OPENSSL_1.0.0'
//lib/i386-linux-gnu/libssl.so.1.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
Error: Make failed: make: *** [sapi/cgi/php-cgi] Error 1

Expected Result

...

Command

Paste your phpbrew install command here (be sure to install with --debug flag, e.g. phpbrew --debug install)

phpbrew --debug install php-5.x.x +openssl -- --....

Build Log

gist here

Platform

OS:

e.g. OS X 10.7, Ubuntu 14.04

Running PHP:

Installing PHP:

Need More Info Won't Fix

Most helpful comment

I ran into a similar problem.

Error: Make failed:
The last 5 lines in the log file:
/usr/bin/ld: ext/openssl/openssl.o: undefined reference to symbol 'SSL_get_verify_result@@OPENSSL_1.0.0'

//lib/x86_64-linux-gnu/libssl.so.1.0.0: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status

Makefile:244: recipe for target 'sapi/cgi/php-cgi' failed

make: *** [sapi/cgi/php-cgi] Error 1

It comes down to a OpenSSL version incompatibility. PHP 5.3 needs OpenSSL version 0.9.X where newer versions (and my OS) used 1.X

I solved the issue by compiling OpenSSL 0.9.8 from source. After that PHP 5.3 installed fine.

The commands I ran are:

wget https://www.openssl.org/source/old/0.9.x/openssl-0.9.8zh.tar.gz 
tar -zxvf openssl-0.9.8zh.tar.gz
cd openssl-0.9.8zh
./config --prefix=/usr/local --openssldir=/usr/local/openssl-0.9.8
make
make test
sudo make install
phpbrew install 5.3

List of available versions at https://www.openssl.org/source/old/0.9.x/

All 4 comments

What was your platform? php 5.3 might be too old for these newer platforms.

I ran into a similar problem.

Error: Make failed:
The last 5 lines in the log file:
/usr/bin/ld: ext/openssl/openssl.o: undefined reference to symbol 'SSL_get_verify_result@@OPENSSL_1.0.0'

//lib/x86_64-linux-gnu/libssl.so.1.0.0: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status

Makefile:244: recipe for target 'sapi/cgi/php-cgi' failed

make: *** [sapi/cgi/php-cgi] Error 1

It comes down to a OpenSSL version incompatibility. PHP 5.3 needs OpenSSL version 0.9.X where newer versions (and my OS) used 1.X

I solved the issue by compiling OpenSSL 0.9.8 from source. After that PHP 5.3 installed fine.

The commands I ran are:

wget https://www.openssl.org/source/old/0.9.x/openssl-0.9.8zh.tar.gz 
tar -zxvf openssl-0.9.8zh.tar.gz
cd openssl-0.9.8zh
./config --prefix=/usr/local --openssldir=/usr/local/openssl-0.9.8
make
make test
sudo make install
phpbrew install 5.3

List of available versions at https://www.openssl.org/source/old/0.9.x/

Also it's possible to install php without openssl. It worked for me:

phpbrew install php-5.4.45 -openssl

Thank's

On macOS Catalina 10.15.2

phpbrew install 5.6.33 +default _-openssl_

It worked fine for me too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

morozov picture morozov  路  6Comments

WelingtonM picture WelingtonM  路  5Comments

rodsimpson picture rodsimpson  路  5Comments

Exaltia picture Exaltia  路  4Comments

luohengyi picture luohengyi  路  5Comments