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
  • 122,292
  • 133
  • 301
  • 332

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
1

Enable the PHP mcrypt module before installing Laravel.

Using the command: sudo php5enmod mcrypt

Dan
  • 6,784