无法编译 mcrypt(配置失败:mhash_keygen in -lmhash...否)
Shawn Chin 在答案 1 中解决了问题。而让我抓狂的是,要编译mcrypt扩展,只需要libmcrypt就足够了,不需要编译mhash和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,但我在中查找“mhash_keygen”时 0.8.15/8:
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 ();
我在configure中将“char”更改为“mutils_error”,错误仍然出现,
我还能做什么。 ...?
感谢您阅读我的问题。
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 :(
I want to compile mcrypt extension for php (RHEL5.1, Intel i5 650), here is my procedure
# 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
configure failed with notice:
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/"
So I downloaded mhash0.8.18 and mhash0.8.15, but the same error occurred.
I looked up "mhash_keygen" in 0.8.15/8:
int mhash_keygen(xxx,xxx,xxx)
And it's in 0.9.9.9:
#if defined(PROTOTYPES)
mutils_error mhash_keygen(keygenid algorithm, ....)
#else
mutils_error mhash_keygen();
#endif
//typedef uint32 mutils_error
But, mcrypt-2.6.8/configure +12114, it's:
char mhash_keygen ();
I changed "char" to "mutils_error" in configure, the error still appears.
What can I do more....?
Thanks for reading my loooooooong question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 RHEL5 机器上重新跟踪了您的步骤,并且确实遇到了相同的错误。
从
config.log
来看,似乎无法找到libmhash
。应该有一种更简洁的方法来做到这一点,但我设法通过提供
lib
和include
目录来配置和编译 mcrypt em>mhash 通过额外的CFLAGS
和LDFLAGS
。I've retraced your steps on an RHEL5 box, and did get the same error.
From at
config.log
, it looks like thelibmhash
could not be located.There ought to be a cleaner way to do it, but I managed to get mcrypt configured and compiled by providing the
lib
andinclude
directories for mhash via additionalCFLAGS
andLDFLAGS
.