Skip to Content

Compile and install mcrypt

record ssh session

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

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:

HOW TO UPGRADE PHP TO 8.2 IN SUSE Linux Enterprise 15(SLES)

Upgrade to php version 8.2 in OpenSUSE 15