【发布时间】:2015-05-22 02:07:47
【问题描述】:
所以在工作中,我的任务是学习并开始使用一些 Laravel,所以我一直在关注 Youtube 上的文档和一些教程,但我似乎无法让它工作。我正在使用 composer 和 MAMP 来安装 Laravel。当我在 htdocs 中使用命令(在终端中)“composer create-project laravel/laravel TestLaravel”时。它很快就出现了这个错误:
➜ htdocs composer create-project laravel/laravel TestLaravel
Installing laravel/laravel (v5.0.1)
- Installing laravel/laravel (v5.0.1)
Loading from cache
Created project in TestLaravel
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.5 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.4 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.3 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- 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, v5.0.3, v5.0.4, v5.0.5].
我想知道是否有人可以为我解决这个问题。
谢谢。
约书亚·约翰逊
【问题讨论】:
-
宅基地是您的选择吗?它是官方推荐的 dev-env 参见laracasts.com/lessons/say-hello-to-laravel-homestead-two
-
除了 Homestead,Homebrew(没有关系 - brew.sh)是在 OSX 上安装 PHP 等东西的好方法。
brew install php56 php56-mcrypt可以解决问题。