search

Home  >  Q&A  >  body text

javascript - linux 安装 mcrypt PHP拓展遇到如下问题,怎么解决呢?

[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

怪我咯怪我咯2776 days ago747

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-04-11 12:27:03

    如果你用的是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 #编译安装

    reply
    0
  • 高洛峰

    高洛峰2017-04-11 12:27:03

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

    reply
    0
  • Cancelreply