centos65编译mcrypt

WBOY
WBOYasal
2016-07-29 09:04:14900semak imbas

下载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教程有兴趣的朋友有所帮助。

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn