OpenSSL two versions

Peter Laws

Verified User
Joined
Sep 13, 2008
Messages
1,786
Location
London UK
What is the best way to check if there's two versions installed?

PHP will not compile on a server due to OpenSSL errors, and I'm sure having 2 versions installed is the issue.
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,243
Location
GMT +7.00
Hello,

Use locate/find to find anything with name openssl outside /home/
 

Peter Laws

Verified User
Joined
Sep 13, 2008
Messages
1,786
Location
London UK
Ok, in that case what, would be the reason why PHP (no matter what version) fails stating something about OpenSSL stuff?

See this Pastebin
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,892
Location
LT, EU
What's the output of:
Code:
ls /usr/local/lib | grep libssl
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,892
Location
LT, EU
Okay, do you have anything in /usr/local/directadmin/custombuild/custom ? *configure* files.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,892
Location
LT, EU
only for apache, curl (both for this http/2 feature), and proftpd (for mod_sftp)
It's likely cURL conflicting with PHP loaded OpenSSL too. Try removing custom curl config, recompile and see if that helps.
 

Peter Laws

Verified User
Joined
Sep 13, 2008
Messages
1,786
Location
London UK
Now, all I need is to work out why this is happening on another system..... Why looking for apache2 directory instead of httpd?
Code:
Installing php...
Installing PHP SAPI module:       apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/var/www/build/libtool' libphp7.la /usr/lib/apache2/modules
/var/www/build/libtool --mode=install install libphp7.la /usr/lib/apache2/modules/
libtool: install: install .libs/libphp7.so /usr/lib/apache2/modules/libphp7.so
libtool: install: install .libs/libphp7.lai /usr/lib/apache2/modules/libphp7.la
libtool: warning: remember to run 'libtool --finish /usr/local/directadmin/custombuild/php-7.2.27/libs'
chmod 644 /usr/lib/apache2/modules/libphp7.so
apxs:Error: Config file /etc/apache2/mods-available not found.
Makefile:170: recipe for target 'install-sapi' failed
make: *** [install-sapi] Error 1
/etc/apache2/mods-available doesn't exist
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,892
Location
LT, EU
Now, all I need is to work out why this is happening on another system..... Why looking for apache2 directory instead of httpd?
Code:
Installing php...
Installing PHP SAPI module:       apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/var/www/build/libtool' libphp7.la /usr/lib/apache2/modules
/var/www/build/libtool --mode=install install libphp7.la /usr/lib/apache2/modules/
libtool: install: install .libs/libphp7.so /usr/lib/apache2/modules/libphp7.so
libtool: install: install .libs/libphp7.lai /usr/lib/apache2/modules/libphp7.la
libtool: warning: remember to run 'libtool --finish /usr/local/directadmin/custombuild/php-7.2.27/libs'
chmod 644 /usr/lib/apache2/modules/libphp7.so
apxs:Error: Config file /etc/apache2/mods-available not found.
Makefile:170: recipe for target 'install-sapi' failed
make: *** [install-sapi] Error 1
/etc/apache2/mods-available doesn't exist
Likely dpkg/rpm package of Apache installed there?
 

Peter Laws

Verified User
Joined
Sep 13, 2008
Messages
1,786
Location
London UK
Likely dpkg/rpm package of Apache installed there?
# dpkg --get-selections | grep apache
apache2-dev install

Can't really recall why I needed to install the dev package.


Back to this OpenSSL thing, I forgot, Exim also failed to compile mentioning SSL stuff
Code:
cc -DMACRO_PREDEF tls.c
cc -DMACRO_PREDEF transports/appendfile.c
tls.c:23:3: error: #error One of USE_OPENSSL or USE_GNUTLS must be defined for a TLS build
 # error One of USE_OPENSSL or USE_GNUTLS must be defined for a TLS build
   ^~~~~
cc -DMACRO_PREDEF transports/autoreply.c
Makefile:272: recipe for target 'macro-tls.o' failed
make[1]: *** [macro-tls.o] Error 1
 

Peter Laws

Verified User
Joined
Sep 13, 2008
Messages
1,786
Location
London UK

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,892
Location
LT, EU
Changing mirror then ./build clean and ./build update_data fixed it <shrug emoji>
Dodgy mirrors?! (was set to 'files-fr.' fwiw)

And removing (purge) apache2-dev then rebuilding fixed php compiles.
file-fr is always in sync, shouldn't have been the cause.
 
Top