php – 无法编译mcrypt(配置失败:-lmhash中的mhash_keygen … no)
Problem solved by Shawn Chin in Answer 1. And what drives me crazy is that to compile mcrypt extension, only libmcrypt is enough, there is no need to compile mhash and mcrypt 🙁
我想为php编译mcrypt扩展(RHEL5.1,Intel i5 650),这是我的程序
# libmcrypt
tar zxf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure --prefix=/home/felix021/lamp/libmcrypt/
make
make install
# mhash
tar jxf mhash-0.9.9.9.tar.bz2
cd mhash-0.9.9.9
./configure --prefix=/home/felix021/lamp/mhash/
make
make install
# mcrypt
LD_LIBRARY_PATH=/home/felix021/lamp/libmcrypt/lib:/home/felix021/lamp/mhash/lib
./configure --prefix=/home/felix021/lamp/mcrypt/ \
--with-libmcrypt-prefix=/home/felix021/lamp/libmcrypt
配置失败并注意到:
checking for mhash_keygen in -lmhash... no
configure: error: "You need at least libmhash 0.8.15 to compile this program. \
http://mhash.sf.net/"
所以我下载了mhash0.8.18和mhash0.8.15,但是发生了同样的错误.
我在0.8.15 / 8中查找了“mhash_keygen”:
int mhash_keygen(xxx,xxx,xxx)
它在0.9.9.9:
#if defined(PROTOTYPES)
mutils_error mhash_keygen(keygenid algorithm, ....)
#else
mutils_error mhash_keygen();
#endif
//typedef uint32 mutils_error
但是,mcrypt-2.6.8 / configure 12114,它是:
char mhash_keygen ();
我在配置中将“char”更改为“mutils_error”,错误仍然出现.
我还能做些什么……?
感谢您阅读我的loooooooong问题.