Laravel 4-需要Mcrypt扩展 [英] Laravel 4 - Mcrypt extension required

查看:63
本文介绍了Laravel 4-需要Mcrypt扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚完成安装Ubuntu,设置了Apache,MySQL和PHP.然后,我决定安装Laravel框架.我运行了composer install并收到以下错误:

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

然后我安装了mcrypt deal,剩下的只是工匠错误.我决定继续从事我的业务,​​因为我无法在线找到解决方案.

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.

现在我开始我的第一个laravel项目.我运行php artisan migrate:install并说Mcrypt PHP extension required.

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

该如何解决?

我运行了此命令,但没有帮助:

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

推荐答案

您只需要确保扩展配置文件已链接到正确的位置即可.这是通过php5enmod实用程序完成的.您不应该直接创建符号链接

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

然后使用php5enmod工具

sudo php5enmod mcrypt

然后重新加载Apache

then reload Apache

sudo service apache2 reload

这篇关于Laravel 4-需要Mcrypt扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆