javascript - linux 安装 mcrypt PHP拓展遇到如下问题,怎么解决呢?
怪我咯
怪我咯 2017-04-11 12:25:03
0
2
754

[root@localhost mcrypt-2.6.8]# make
make all-recursive
make[1]: Entering directory `/usr/local/src/mcrypt-2.6.8'
Making all in doc
make[2]: Entering directory `/usr/local/src/mcrypt-2.6.8/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/mcrypt-2.6.8/doc'
Making all in src
make[2]: Entering directory `/usr/local/src/mcrypt-2.6.8/src'
gaa -o gaaout.c -i gaa.h mcrypt.gaa
make[2]: gaa:命令未找到
make[2]: * [gaaout.c] 错误 127
make[2]: Leaving directory `/usr/local/src/mcrypt-2.6.8/src'
make[1]: * [all-recursive] 错误 1
make[1]: Leaving directory `/usr/local/src/mcrypt-2.6.8'
make: * [all] 错误 2

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(2)
Peter_Zhu

如果你用的是Ubuntu/Debian系统,执行sudo apt-get install php5-mcrypt就行了.
如果你是自己编译的PHP,则需要通过PHP提供的phpize来添加扩展:

#先安装mcrypt开发包(包含头文件和库文件),这样就不需要自己编译mcrypt库了
sudo apt-get install libmcrypt-dev
/usr/include/mcrypt.h #头文件
/usr/lib/libmcrypt.so #动态库
/usr/lib/libmcrypt.a  #静态库

#用phpize编译php5-mcrypt扩展
cd php-src/ext/mcrypt
/opt/php/5.6/bin/phpize #生成configure
./configure --with-php-config=/opt/php/5.6/bin/php-config #生成Makefile
make && make install #编译安装
小葫芦

根据返回的错误提示 make[2]: gaa:命令未找到

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template