首页 >后端开发 >php教程 >centos65编译mcrypt

centos65编译mcrypt

WBOY
WBOY原创
2016-07-29 09:04:14905浏览

下载php源代码进行编译

<code>cd php/ext/mcrypt
phpize
<span>error</span>: 
    No <span>package</span> libmcrypt available.
    No <span>package</span> libmcrypt-devel available.
    No <span>package</span> mcrypt available.
    No <span>package</span> mhash available.

yum  install epel-release  //扩展包更新包
yum  update //更新yum源
yum install libmcrypt libmcrypt-devel mcrypt mhash  就ok了

./configure
<span>error</span>
    /Downloads/php-<span>5.5</span><span>.31</span>/ext/mcrypt/mcrypt.c:<span>283</span>: 错误:‘PHP_FE_END’未声明(不在函数内)</code>

解决方案

<code><span>sed</span> -i <span>'s|PHP_FE_END|{NULL,NULL,NULL}|'</span> ./<span>*.c</span>sed -i <span>'s|ZEND_MOD_END|{NULL,NULL,NULL}|'</span> ./<span>*.c</span></code>

下一步:

<code>./configure
<span>make</span><span>make</span> test <span>// 可以省略</span>
sudo <span>make</span> install</code>

下一步:
make install 后, 我们就在 /usr/lib64/php/modules/ 里面看到 mcrypt.so

<code> cd /etc/php<span>.d</span>/
 sudo vi mcrypt<span>.ini</span>
   extension=mcrypt<span>.so</span></code>

重启apache 看效果啦

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了centos65编译mcrypt,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn