CentOS6.0 yum php mcrypt 扩展安装问题
基本原理是:首先使mcrypt软件能够运行,然后安装php扩展模块,并在php.ini配置。
这里注意的是mcrypt软件依赖libmcrypt和mhash两个库,所以安装配置顺序从右至左
1.先去http://www.sourceforge.net 下载Libmcrypt,mhash,mcrypt安装包 ,下面是我找到的链接
Libmcrypt( libmcrypt-2.5.8.tar.gz ): http://sourceforge.net/project/showfiles.php?group_id=87941&package_id=91774&release_id=487459
mcrypt( mcrypt-2.6.8.tar.gz ): http://sourceforge.net/project/showfiles.php?group_id=87941&package_id=91948&release_id=642101
mhash( mhash-0.9.9.9.tar.gz ): http://sourceforge.net/project/showfiles.php?group_id=4286&package_id=4300&release_id=645636
2 .先安装Libmcrypt
#tar -zxvf libmcrypt-2.5.8.tar.gz
#cd libmcrypt-2.5.8
#./configure
#make
#make install
说明:libmcript默认安装在/usr/local/lib
3.安装mhash
#tar -zxvf mhash-0.9.9.9.tar.gz
#cd mhash-0.9.9.9
#./configure
#make
#make install
4.安装mcrypt
#tar -zxvf mcrypt-2.6.8.tar.gz
#cd mcrypt-2.6.8
#LD_LIBRARY_PATH=/usr/local/lib ./configure
#make
#make install
说明:由于在配置Mcrypt时,会找不到libmcrypt的链接库,导致无法编译,因为Libmcrypt的链接库在/usr/local/lib/文件夹 下。因些在配置mcrypt时要加入LD_LIBRARY_PATH=/usr/local/lib导入键接库