6

I'm having trouble with Ubuntu 14.04, Xampp and Laravel. I'm getting Mcrypt PHP extension required. Script php artisan clear-compiled handling the post-install-cmd event returned with an error when try to install laravel.

I know there are several thread on it and I tried most of them but no luck.

karel
  • 110,292
  • 102
  • 269
  • 299
Sisyphus Excerpt
  • 81
  • 1
  • 1
  • 4
  • here you can check it for windows, linux, mac installations of mcrypt extension. http://www.kvcodes.com/2014/07/laravel-requires-mcrypt-php-extension/ – Kvvaradha Feb 09 '16 at 04:13

2 Answers2

10

The desired Mcrypt PHP extension is packaged in a different package, namely php5-mcrypt. To get this package installed on your machine, you can use apt-get, like this:

sudo apt-get install php5-mcrypt

In addition, PHP extensions have to be registered with the correct Server API (SAPI); there is a command-line tool called php5enmod provided by the packager to simplify this process; e.g.

sudo php5enmod mcrypt

will add the correct extension=mcrypt.so line to all the relevant php.ini files.

TML
  • 512
  • 3
  • 14
auxiliaire
  • 101
  • 4
  • +1 But, as @Whaaaaaat commented, I'd like to understand things as newbie linux user – toesslab Sep 27 '14 at 13:16
  • Thanks Everyone. If you already install PHPMyadmin you don't need to install mycrypt again. Make sure myscrypt is enabled. Just execute the following code: `sudo php5enmod mcrypt` – Sisyphus Excerpt Apr 08 '15 at 08:45
1

Enable the PHP mcrypt module before installing Laravel.

Using the command: sudo php5enmod mcrypt

Dan
  • 6,715
  • 5
  • 26
  • 43