Cómo instalar libmcrypt
2. Instale Libmcrypt primero
#tar -zxvf libmcrypt-2.5.8.tar.gz
#cd libmcrypt-2.5.8
#./configure
#make
#make install
Nota: libmcript se instala en /usr/local de forma predeterminada
3. Instalar mhash
#tar -zxvf mhash-0.9.9.9.tar.gz
#cd mhash-0.9.9.9
#./configure
#make
#make install
4. Instalar mcrypt
#tar -zxvf mcrypt-2.6. 8.tar.gz
#cd mcrypt-2.6.8
#LD_ LIBRARY_PATH=/usr/local/lib ./configure
#make
p>#make install
Nota: Al configurar Mcrypt, dado que la biblioteca de enlaces libmcrypt está ubicada en la carpeta /usr/local/, no se puede encontrar la biblioteca de enlaces libmcrypt, lo que provoca que la compilación falle. .
Por lo tanto, agregue LD_LIBRARY_PATH=/usr/local cuando configure mcrypt para importar la biblioteca de enlaces
5. Instale PHP
Agregue:
#./configure--with-mcrypt--with-mhash
O agréguelo dinámicamente a través de phpize, ingrese el directorio correspondiente en el código fuente ext/ y ejecute
/ usr /bin/phpize
. /configure --with-php-config=/usr/bin/php-config
make
make install
Luego consulte el archivo php.ini para generar el archivo .so y reiniciar Apache!