문제점
웹사이트 서버 구축을 위해서 apache+php+mysql 설치중 php 소스컴파일 과정에서 아래와 같은 에러메시지를 확인하였다.
![](https://www.itopening.com/wp-content/uploads/2019/12/configure-error-mcrypt.h-not-found-2-1.png)
configure error mcrypt.h not found. please reinstall libmcrypt
![](https://www.itopening.com/wp-content/uploads/2019/12/configure-error-mcrypt.h-not-found-1.png)
이와 같은 에러메시지를 mcrypt.h 라이브러리가 설치되어 있지 않기 때문에 발생된 문제다.
해결방법
mcrypt 라는 라이브러리가 설치되어있지 않아 발생된 문제이기 때문에 아래 설치 가이드를 진행하면된다.
wget https://sourceforge.net/projects/mcrypt/files/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz/download -O mcrypt-2.6.8.tar.gz
tar xvfz mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
./configure && make && make install
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
다시 php 소스컴파일을 진행하면 mcrypt.h not found 문제는 발생되지 않게 된다.