Compile and install mcrypt
How to compile and install mcrypt in SUSE 15?
Overview: This article helps to compile and install the mcrypt extension for PHP in SUSE 15.
Step 1: Install the development tools.
user@suse15:~# zypper in -y php7-devel gcc gcc-c++ re2c make autoconf automake libtool libmcrypt-devel
Step 2: Download libmcrypt and mcrypt
user@suse ~]# wget https://src.fedoraproject.org/repo/pkgs/libmcrypt/libmcrypt-2.5.8.tar.gz/0821830d930a86a5c69110837c55b7da/libmcrypt-2.5.8.tar.gz
user@suse ~]# wget https://pecl.php.net/get/mcrypt-1.0.6.tgz
Step 3: Compile and install libmcrypt:
user@suse ~]# tar zxvf libmcrypt-2.5.8.tar.gz
user@suse ~]# cd libmcrypt-2.5.8/
user@suse ~]# ./configure
user@suse ~]# make
user@suse ~]# make install
Step 4: Compile and install mcrypt:
user@suse ~]# tar zxvf mcrypt-1.0.6.tgz
user@suse ~]# cd mcrypt-1.0.6/
user@suse ~]# /usr/bin/phpize
user@suse ~]# ./configure --with-php-config=/usr/bin/php-config
user@suse ~]# make
user@suse ~]# make install
Step 5: Append extension=mcrypt.so to the php.ini file.
user@suse ~]# echo "extension=mcrypt.so" >> /etc/php7/cli/php.ini
Step 6: Confirm that mcrypt is enabled by running the below command.
user@suse ~]# php -m | grep -i mcrypt
mcrypt
Related Articles: