PHP configure: error: mcrypt.h not found. Please reinstall libmcrypt

1 download libmcrypt

wget http://jaist.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz

2 exact

tar -zxvf libmcrypt-2.5.8.tar.gz 

3 config compile parameter

cd libmcrypt-2.5.8
./configure

4 compile and install

make && make install

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback me#imzye.me, replace # with @
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Try my iOS App