我试图安装laravel以下相当确定我安装了mcrypt
me:~/public_html$ composer create-project laravel/laravel laravel-test
Installing laravel/laravel (v5.0.22)
- Installing laravel/laravel (v5.0.22)
Loading from cache
Created project in laravel-test
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/framework v5.0.16 -> satisfiable by laravel/framework[v5.0.16].
- laravel/framework v5.0.16 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
答案 0 :(得分:0)
sudo apt-get install php5-mcrypt
创建辅助符号链接并启用模块:
cd /etc/php5/mods-available
ln -sf ../conf.d/mcrypt.ini .
php5enmod mcrypt
最后,重新加载apache2配置:
service apache2 reload
首先尝试这个,然后运行上面的代码,因为laravel需要安装mcrypt php扩展。
答案 1 :(得分:0)
这解决了我的问题
sudo rm /etc/php5/mods-available/mcrypt.ini
sudo apt-get purge php5-mcrypt
sudo apt-get install mcrypt
sudo apt-get install php5-mcrypt
sudo php5enmod mcrypt
此处链接 - Error Installing Laravel: Mcrypt PHP extension required