I was installing magento on ubuntu but I get this error at the config: php extension mcrypt must be loaded. The reason of this error message that magento does some encryptions using mcrypt extension. So while installing it checks if mcrypt extension installed and enabled or not.
So I tried: sudo apt-get install php5-mcrypt to install php extension mcrypt but this didn’t work for me. Before this I got same error with curl but when I tried: sudo apt-get install php5-curl it did work for me. But in case of mycrypt it didn’t.
I worked on R&D for this extension mcrypt issue and I got solution.
Steps to install and enable php extension mcrypt :
1. Install php extension mcrypt if not installed already:
sudo apt-get install php5-mcrypt
2. Create symbolic link of mcrypt.ini to enable extension mcrypt .
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/mcrypt.ini
3. Enable extension mcrypt
sudo php5enmod mcrypt
4. Restart apache server
sudo service apache2 reload
sudo /etc/init.d/apache2 restart
Checking for installed PHP extensions happens only during installation, that’s why you don’t get the error message in the working copy.
I strongly recommend to install the PHP extension, otherwise the encryption methods in Magento will not work. If you check the PHP error logs or enable developer mode, you probably see lots of errors because of the missing extension.
That being said, you can create the local.xml file manually or copy it from the other installation instead of using the setup routine. On a fresh database you can choose any hash value as encryption key (the setup routine allows you to enter it or creates it randomly for you)