Debian 9.1 - Makefile:549: recipe for target 'ext/openssl/openssl.lo' failed

Mr_Parham

Well-Known Member
#1
Hi

I just got a new server with Debian 9.1 and I want to compile PHP 5.6.30 with the following configuration parameter

================
'--with-mysqli=mysqlnd' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-mbstring' '--with-iconv' '--with-mcrypt' '--with-curl' '--with-pdo' '--with-mysql=mysqlnd' '--with-xmlrpc' '--enable-module=rewrite' '--enable-ftp' '--enable-gd-native-ttf' '--with-pdo-mysql=mysqlnd' '--with-mcrypt' '--with-openssl' '--with-litespeed'
================

But I get the following error message
================
Makefile:549: recipe for target 'ext/openssl/openssl.lo' failed
make: *** [ext/openssl/openssl.lo] Error 1
**ERROR** Could not compile PHP
================

Please note that I have already install openssl with the following command
=========
root@testserver:~/lsws-5.2# apt-get install openssl
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssl is already the newest version (1.1.0f-3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
=========

Any idea what the issue might be?

Regards
Parham
 

Mr_Parham

Well-Known Member
#3
Already tried, no luck

============
root@ns3079283:~# apt-get install openssl-devel
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package openssl-devel
============

I have also tried installing libssl-dev which I could find but it didn't fix the error

Regards
Parham
 

Yuriy

New Member
#4
Hi.
The these same error on Ubuntu 16.04 + OpenLiteSpeed V1.4.26, when I compile PHP 7.0.19 or 7.1.15
(In PHP Test - current version PHP 5.6.31)
--------------------------------------------------------------------------------------------------------
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking whether to use system default cipher list instead of hardcoded value... no
checking for RAND_egd... no
checking for pkg-config... no
configure: error: Cannot find OpenSSL's libraries
**ERROR** Could not configure PHP build
--------------------------------------------------------------------------------------------------------
root@S1:~# openssl version
OpenSSL 1.0.2g 1 Mar 2016

What should I do???
 
Last edited:

Jon K

Administrator
Staff member
#5
@Mr_Parham The issue you are currently expericing is due to the fact that Debian Stretch comes default with OpenSSL 1.1.0. PHP 5.6 is not compatible to be built with a higher version of OpenSSL. This is a PHP issue but not sure if they will fix as 5.6 is in Security Release only cycle now.

@Yuriy This issue is due to either missing devel packages and/or packages installed in non default locations. You can try a command like this to install the required packages. sudo apt-get install clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev

We do have Repos for Ubuntu + Debian ( Stretch only PHP 7+7.1 ) and can easily install PHP without having to compile it yourself. https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:apt
 

Mr_Parham

Well-Known Member
#6
@Mr_Parham The issue you are currently expericing is due to the fact that Debian Stretch comes default with OpenSSL 1.1.0. PHP 5.6 is not compatible to be built with a higher version of OpenSSL. This is a PHP issue but not sure if they will fix as 5.6 is in Security Release only cycle now.
We do have Repos for Ubuntu + Debian ( Stretch only PHP 7+7.1 ) and can easily install PHP without having to compile it yourself. https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:apt
I didn't know about this, That's great

Thanks a lot
Parham
 

Yuriy

New Member
#7
@Mr_Parham The issue you are currently expericing is due to the fact that Debian Stretch comes default with OpenSSL 1.1.0. PHP 5.6 is not compatible to be built with a higher version of OpenSSL. This is a PHP issue but not sure if they will fix as 5.6 is in Security Release only cycle now.

@Yuriy This issue is due to either missing devel packages and/or packages installed in non default locations. You can try a command like this to install the required packages. sudo apt-get install clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev

We do have Repos for Ubuntu + Debian ( Stretch only PHP 7+7.1 ) and can easily install PHP without having to compile it yourself. https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:apt
Ubuntu said that the package clibcurl4-openssl-dev was not found.
Nevertheless, without it, the compilation moved further. (sudo apt-get install pkg-config libssl-dev libsslcommon2-dev)
Then it was necessary to install the package libmcrypt-dev, after installation it, the compilation PHP 7.1.5 completed successfully!!! :)
 
Top