【发布时间】:2015-02-09 09:37:16
【问题描述】:
我是 ubuntu 14.04 的 laravel 初学者。 我尝试运行以下命令以安装 laravel。
composer create-project laravel/laravel --prefer-dist
我得到了以下错误。 我也尝试安装 ncrypt 但我得到了同样的错误。
Installing laravel/laravel (v5.0.1)
- Installing laravel/laravel (v5.0.1)
Loading from cache
Created project in /opt/lampp/htdocs/laravel
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.0.2 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.1 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.0 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- Installation request for laravel/framework 5.0.* -> satisfiable by laravel/framework[v5.0.0, v5.0.1, v5.0.2].
我也尝试运行这个命令,但我得到了同样的错误。
sudo apt-get install mcrypt php5-mcrypt
sudo php5enmod mcrypt
sudo service apache2 restart
提前谢谢..
【问题讨论】:
-
你运行的是什么 php 版本?