2

I just finished installing Ubuntu, setting up Apache, MySQL, and PHP. I then decided to install the Laravel framework. I ran a composer install and got the following error:

Mcrypt PHP extension required. Script php artisan clear-compiled handling the post-install-cmd event returned with an error 

I then installed mcrypt deal and all that remained was the artisan error. I decided to go on about my business because I couldn't find a solution online.

Now I am starting my first laravel project. I ran php artisan migrate:install and it says Mcrypt PHP extension required.

What can I do to fix this?

I ran this command and it didn't help:

sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini 

I've ran this a couple of times and it just says its installed:

sudo apt-get install php5-mcrypt 
10
  • What's your PHP version? Commented May 12, 2014 at 0:57
  • php -v tells me I am running 5.5.9 Commented May 12, 2014 at 1:00
  • Instead of sudo apt-get install php5-mcrypt, try sudo apt-get install php55-mcrypt. Let me know if its works Commented May 12, 2014 at 1:01
  • 1
    Does php -m | grep mcrypt give you anything? Commented May 12, 2014 at 1:01
  • @SverriM.Olsen No, it does not. Commented May 12, 2014 at 1:03

1 Answer 1

5

You just need to make sure that the extension config file has been linked into the correct spot. This is accomplished via the php5enmod utility. You shouldn't be creating symbolic links directly

I'd say this should work. First, remove the symlink you created...

sudo rm /etc/php5/apache2/conf.d/20-mcrypt.ini 

then use the php5enmod tool

sudo php5enmod mcrypt 

then reload Apache

sudo service apache2 reload 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.