编译php configure: error: mcrypt.h not found. 但是我装了libmcrypt

这是我的shell:

tar -zxvf php-7.0.16.tar.gz
cd ./php-7.0.16


./configure \
 --prefix=/usr/local/php7 \
 --with-config-file-path=/usr/local/php7/etc \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--with-mysqli \
--with-pdo-mysql \
--with-iconv-dir \
--with-freetype-dir \
--with-jpeg-dir \
 --with-png-dir \
--with-zlib \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath  \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--enable-mbregex \
--enable-mbstring \
--with-mcrypt \
--enable-ftp \
--with-gd \
--enable-gd-native-ttf \
--with-openssl \
--with-mhash \
--enable-pcntl \
 --enable-sockets \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--without-pear \
--with-gettext \
--disable-fileinfo \
--enable-maintainer-zts

似乎mcrypt的库没了

clipboard.png

阅读 4.7k
2 个回答

这个库在官方源上面没有。

  • 使用阿里云或者清华大学的epel源,yum安装这个库

  • 下载这个库的源码(libmcrypt-2.5.8.tar.gz),编译安装这个库。

sudo yum install libmcrypt-devel
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题