6

I am running Ubuntu 13.10 desktop and installed a lamp stack (Apache 2.4.6, and PHP Version 5.5.3-1ubuntu2), and I set up virtual hosts. I also apt-get'ed php5-curl, and php5-mcrypt (no errors when installing)

I am trying to set up a Magento (1.8.0.0) development environment and the error I am getting is:

PHP extension "mcrypt" must be loaded.

How do I "load" mcrypt?

1
  • This very same issue still exists in 14.04.
    – user272735
    May 14, 2015 at 17:19

2 Answers 2

10

There seems to be an issue with the mcrypt package in that it isn't included in the available mods after being installed.

To fix, simply:

sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/mcrypt.ini
sudo php5enmod mcrypt
sudo restart apache2

If the last command doesn't work, do sudo service apache2 restart instead.

3
  • 1
    This answer helped lead me in the right direction. I simply had to do: sudo php5enmod mcrypt sudo service apache2 reload sudo service apache2 restart
    – Mike McCoy
    Jun 2, 2014 at 15:16
  • I have my mcrypt.ini file under /etc/php5/mods-available/mcrypt.ini when i try to do sudo ln -s it fails and say that file exist ... i dont see my mcrypt file on /etc/php5/conf.d/ or /etc/php5/apache2/conf.d/ May 14, 2015 at 12:41
  • 2
    @GuillermoNahuelVarelli In Ubuntu 14.04 there is no need to create the link. Instead just do sudo php5enmod mcrypt and sudo service apache2 restart.
    – user272735
    May 14, 2015 at 17:28
1

The solutions is install php5-mcrypt module in and enable it. Use the below command sequence.

sudo apt-get install php5-mcrypt
sudo php5enmod php5-mcrypt
sudo service apache2 restart

Follow the below url to install magento2 (M2) on ubuntu server.

http://gotechnies.com/install-magento2-ubuntu-server/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .