Instalar php-mcrypt en CentOS 6


He estado tratando de instalar php-mcrypt desde hace un tiempo. Cada vez que recibo el "No hay paquete php-mcrypt disponible."volvió a mí. Esto es lo que he intentado:

root@ip-********** [~]# yum install php-mcrypt --enablerepo=centosplus (<- both with and without this)
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: p3plmirror01.prod.phx3.secureserver.net
* centosplus: p3plmirror01.prod.phx3.secureserver.net
* epel: mirrors.solfo.com
* extras: p3plmirror01.prod.phx3.secureserver.net
* updates: p3plmirror01.prod.phx3.secureserver.net
centosplus                                               | 3.5 kB     00:00
centosplus/primary_db                                    | 746 kB     00:00
Setting up Install Process
No package php-mcrypt available.
Error: Nothing to do

Me he asegurado de instalar el repositorio EPEL. En este punto estoy perplejo. He seguido todos los tutoriales que he encontrado en línea y obtener el mismo error.

Notas: Go Daddy VPS, CentOS 6.4 64-bit, mcrypt instalado sin problemas, pero sin php-mcrypt.

 56
Author: Peter Mortensen, 2013-06-14

17 answers

Tuve el mismo problema, y encontré que las sugerencias anteriores me dieron suficiente información para que funcionara en mi servidor. Lo siguiente es lo que hice:

1) Instale el repositorio EPEL (De: http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x):

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

2) Instalarlo a través de:

yum update
yum install php-mcrypt*

El yum update actualizó la referencia del repositorio en mi servidor, luego el 2do comando obtuvo lo que necesitaba:)

3) Reinicie su servidor web. Para mi instalé apache:

service httpd restart
 114
Author: James Oravec,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-08-31 22:39:39

Para mí la respuesta fue:

1) Obtener los repositorios de

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

2) Instalarlo a través de:

sudo yum update
sudo yum install php-mcrypt*

3) Editar el mcrypt.ini

sudo nano /etc/php.d/mcrypt.ini

Añadir esto

extension=/usr/lib64/php/modules/mcrypt.so

Finalmente 4) Reinicie su servidor web:

sudo service httpd restart

Corro estos pasos en CentOS 6.3 (64) en Azure Desde Microsoft Linux image

Espero que te ayude.

Saludos cordiales.

 26
Author: Compusam,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-09-27 04:37:39

Respuesta actualizada para centos 7

 ## RHEL/CentOS 7 64-Bit ##
 # wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm
 # rpm -ivh epel-release-7-0.2.noarch.rpm

Para CentOS 6

 ## RHEL/CentOS 6 32-Bit ##
 # wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
 # rpm -ivh epel-release-6-8.noarch.rpm

 ## RHEL/CentOS 6 64-Bit ##
 # wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
 # rpm -ivh epel-release-6-8.noarch.rpm

Instalar

 yum install php-mcrypt

Editar : Ver comentarios para repositorios actualizados.

 11
Author: TylersSN,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-06-30 18:10:00
yum install php-mcrypt.x86_64

Funcionó para mí en lugar de

yum install php-mcrypt
 9
Author: sariDon,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-04-03 21:06:40

Solo un aviso a cualquier otra persona que esté interesada. Fui capaz de averiguarlo. Era mucho más simple de lo que pensaba. Bajo el administrador WHM vaya a: Inicio > > Software > > EasyApache (Actualización de Apache) >> Allí tiene dos opciones "Construir perfil" o "Personalizar según el perfil". Fui a Personalizar para mantener mi configuración actual y luego seguí las instrucciones en la página. Eventualmente hubo un lugar para agregar y eliminar módulos php. Allí encontrará siempre módulo bajo el sol. Solo tienes que seleccionar el que quiero y reconstruir el perfil. Era realmente así de simple.

Espero que esto ayude a alguien!

 6
Author: Scott Dawson,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-07-03 13:36:27

Tengo demasiados problemas al instalar php-mcrypt usando epel-release-6-8.noarch.rpm. Tiene algún problema de dependencia.

Luego lo intenté de manera diferente.

Obtenga el php-mcrypt usando " wget ftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/x86_64/php-mcrypt-5.3.3-3.el6.x86_64.rpm"comando.

Luego instale libmcrypt

Ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm

El php-mcrypt instalado usando el siguiente comando

yum install php-mcrypt-5.3.3-3.el6.x86_64.rpm
 4
Author: Manoj Borah,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-10-18 04:47:41

Si php_mcrypt está instalado en 64 bits pero es reportado como desaparecido por un instalador, compruebe la ruta de la extensión:

Vi / etc / php.d / mcrypt.ini

; Enable mcrypt extension module
;extension=module.so
extension=/usr/lib64/php/modules/mcrypt.so
 3
Author: user2599431,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-07-19 12:20:47

Para instalar mcrypt desde http://namhuy.net/641/centos-6-install-mcrypt-for-phpmyadmin.html

I386

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

X86_64

http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Entonces simplemente use el comando yum para instalar el paquete mcrypt

yum install php-mcrypt
 3
Author: Gregory Marsh,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-11-06 21:45:21

La mejor manera es:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/php-mcrypt-5.3.3-3.el6.x86_64.rpm
yum localinstall php-mcrypt-5.3.3-3.el6.x86_64.rpm

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm
yum localinstall libmcrypt-2.5.8-9.el6.x86_64.rpm

O vaya a: http://dl.fedoraproject.org/pub/epel/6/x86_64 / para que coincida con su versión compruebe desde su información.php que está bien hecho!

 3
Author: Dimitrios,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-03-24 11:38:15

Hay dos maneras de abordar esto:

 2
Author: Filippos Karapetis,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-06-14 13:42:55

Para mí tuve que añadir el repositorio EPEL. Es de donde vino mi php-mcrypt:

[root@system ~]$ repoquery -i php-mcrypt

Name        : php-mcrypt
Version     : 5.3.3
Release     : 1.el6
Architecture: i686
Size        : 39225
Packager    : Fedora Project
Group       : Development/Languages
URL         : http://www.php.net/
Repository  : epel <----------
Summary     : Standard PHP module provides mcrypt library support
Source      : php-extras-5.3.3-1.el6.src.rpm
Description :
Standard PHP module provides mcrypt library support

Puede habilitar el repositorio EPEL con las instrucciones aquí:

Http://fedoraproject.org/wiki/EPEL

 1
Author: immulatin,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-06-14 13:52:24

Instalar php-mcrypt desde Repoforge me funcionó perfectamente. Solo tiene que añadir Repoforge desde http://repoforge.org / y simplemente ejecute yum install php-mcrypt.

 1
Author: ElChupacabra,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-08-01 11:37:26

Para mí, esto funcionó :
yum install php-mcrypt*
y luego, reinicie el servicio httpd
service httpd restart

Probé la solución de @VenomFangs, pero el primer paso no era necesario para mí. Ya tenía instalada una nueva versión de EPEL. Por lo tanto, el primer paso siguiente no fue útil, respaldé la instantánea que hice antes de hacer modificaciones y solo usé los comandos de instalación y reinicio anteriores.

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

CentOS Linux release 7.2.1511 (Core)

PS: Sé que esto no es el tema, pero si alguien lo necesita, la palabra clave puede ayudar. Necesitaba hacer esto debido a este error en prestashop. Dos palabras clave que estaría encantado de utilizar para encontrar esta información son: "php_mycrypt.dll "" php_mcrypt.dll"
Fatal error: Call to undefined function mcrypt_encrypt() in /classes/Rijndael.php on line 46

EDITAR 10/06/2016:
Otra solución Prestashop para probar en "Parámetros avanzados"," Rendimiento"," Cifrado " (FR : Gasa), "Use the custom BlowFish class." en lugar de "Use Rijndael with mcrypt lib. (you must install the Mcrypt extension)."

 1
Author: Kilowog,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-06-10 09:10:52

Estaba teniendo el mismo problema en centos 6.5

Finalmente la solución a continuación funcionó para mí

-ir a http://dl.fedoraproject.org/pub/epel/6/x86_64/
- buscar php-mcrypt(http://dl.fedoraproject.org/pub/epel/6/x86_64/php-mcrypt-5.3.3-3.el6.x86_64.rpm)
- ejecutar wget http://dl.fedoraproject.org/pub/epel/6/x86_64/php-mcrypt-5.3.3-3.el6.x86_64.rpm
- rpm - ivh php-mcrypt-5.3.3-3.el6.x86_64.rpm

Si hay alguna dependencia puede descarga same usando http://dl.fedoraproject.org/pub/epel/6/x86_64 /

 0
Author: Maulik Shah,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-10-14 14:47:09

Primero averigüe su versión de PHP. En mi caso 5.6.

php --version

PHP 5.6.27 (cli) (built: Oct 15 2016 21:31:59) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

Entonces:

sudo yum search mcrypt

Y elegir el mejor para su versión de la lista, he utilizado php56w-mcrypt.

  $ sudo yum search mcrypt
  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile

  ..... output truncated ....

libmcrypt-devel.i686 : Development libraries and headers for libmcrypt
libmcrypt-devel.x86_64 : Development libraries and headers for libmcrypt
libtomcrypt-devel.i686 : Development files for libtomcrypt
libtomcrypt-devel.x86_64 : Development files for libtomcrypt
libtomcrypt-doc.noarch : Documentation files for libtomcrypt
php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
php55w-mcrypt.x86_64 : Standard PHP module provides mcrypt library support

# either of these are fine:
php56-php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
php56w-mcrypt.x86_64 : Standard PHP module provides mcrypt library support

php70-php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
php70w-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
php71-php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
libmcrypt.i686 : Encryption algorithms library
libmcrypt.x86_64 : Encryption algorithms library
libtomcrypt.i686 : A comprehensive, portable cryptographic toolkit
libtomcrypt.x86_64 : A comprehensive, portable cryptographic toolkit
mcrypt.x86_64 : Replacement for crypt()
```

Finalmente:

sudo service httpd restart

 0
Author: sijpkes,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-31 22:59:34

Para que php 7 instale mcrypt ejecute:

Centos: sudo yum install php7. 0-mcrypt para instalar

En Ubuntu: sudo apt-get install php7. 0-mcrypt

 0
Author: Sorin,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-01-18 10:14:25

Si desea recompilar PHP con mcrypt enable.

1. Insatll mcrypt. libmcrypt-devel es de repositorios de terceros EPEL, por lo que debe:

yum --enablerepo=extras install epel-release
yum install libmcrypt-devel

2. Añade --with-mcrypt a tus ./configure argumentos:

./configure --with-mcrypt

3. Compilar e instalar:

make & make install
 0
Author: isaacselement,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-08-31 08:39:40