Skip to Content

Compile and install mcrypt

record ssh session

How to compile and install mcrypt in SUSE 15?

1.Install the development tools.

user@suse ~]# zypper in -y php7-devel gcc gcc-c++ re2c make autoconf automake libtool libmcrypt-devel

2. Download libmcrypt and mcrypt

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

3. 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

4. Append extension=mcrypt.so to the php.ini configuration file.

user@suse ~]# echo "extension=mcrypt.so" >> /etc/php7/cli/php.ini

5. Confirm that mcrypt is enabled by running the below command.

user@suse ~]# php -m | grep -i mcrypt

mcrypt