Para fazer isso funcionar no Centos 7
yum install -y php php-common
yum reinstall -y openssl openssl-libs
systemctl restart httpd
Eu estou tentando por alguns dias para instalar o php sem qualquer sorte. O processo que geralmente leva 2 minutos. Eu tenho o CentOS 7.4.1708 e o Apache 2.4.6.
Quando eu instalo o php usando yum install php
e executo o comando
php -v
Eu recebo o erro php: /lib64/libcrypto.so.10: version OPENSSL_1.0.2 not found (required by php)
Quando executo o comando rpm -qi openssl
obtenho package openssl is not installed
Quando executo openssl version
obtenho OpenSSL 1.0.1e-fips 11 Feb 2013
Quando execute o comando yum info openssl
Eu recebo
Available Packages
Name : openssl
Arch : x86_64
Epoch : 1
Version : 1.0.2k
Release : 8.el7
Size : 492 k
Repo : base/7/x86_64
Summary : Utilities from the general purpose cryptography library with TLS implementation
URL : http://www.openssl.org/
License : OpenSSL
Description : The OpenSSL toolkit provides support for secure communications between
: machines. OpenSSL includes a certificate management tool and shared
: libraries which provide various cryptographic algorithms and
: protocols.
yum info php dá a Available Packages
Name : php
Arch : x86_64
Version : 5.4.16
Release : 43.el7_4.1
Size : 1.4 M
Repo : updates/7/x86_64
Summary : PHP scripting language for creating dynamic web sites
URL : http://www.php.net/
License : PHP and Zend and BSD
Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
: easy for developers to write dynamically generated web pages. PHP also
: offers built-in database integration for several commercial and
: non-commercial database management systems, so writing a
: database-enabled webpage with PHP is fairly simple. The most common
: use of PHP coding is probably as a replacement for CGI scripts.
:
: The php package contains the module (often referred to as mod_php)
: which adds support for the PHP language to Apache HTTP Server.
A saída de yum update openssl
é
Loaded plugins: fastestmirror, priorities
base | 3.6 kB 00:00:00
cm-rhel7-8.0 | 1.3 kB 00:00:00
cm-rhel7-8.0-updates | 1.3 kB 00:00:00
epel/x86_64/metalink | 29 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
webtatic | 3.6 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: centos.mirroring.pulsant.co.uk
* cm-rhel7-8.0: updates-eu.brightcomputing.com
* cm-rhel7-8.0-updates: updates-eu.brightcomputing.com
* epel: www.mirrorservice.org
* extras: centos.mirroring.pulsant.co.uk
* updates: centos.mirroring.pulsant.co.uk
* webtatic: uk.repo.webtatic.com
101 packages excluded due to repository priority protections
No packages marked for update
Aqui está a saída do comando ldd /lib64/libcrypto.so.10
linux-vdso.so.1 => (0x00002aaaaaaab000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaaaea8000)
libz.so.1 => /lib64/libz.so.1 (0x00002aaaab0ac000)
libc.so.6 => /lib64/libc.so.6 (0x00002aaaab2c3000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
Saída do comando openssl version -a
openssl: /lib64/libcrypto.so.10: version 'OPENSSL_1.0.2' not found (required by openssl)
Aqui está a saída de which openssl
%código%
A saída de
/usr/bin/openssl
está vazia.
Ok, estou avançando com este comando env | grep LD_
Esse erro se foi. Agora há um pequeno problema, eu acho. A saída de yum reinstall openssl openssl-libs
é
php -v
Como obter a versão correta do php e openssl para se livrar do erro?
Para fazer isso funcionar no Centos 7
yum install -y php php-common
yum reinstall -y openssl openssl-libs
systemctl restart httpd
Tags openssl php linux apache-2.4 centos