我是ubuntu 14.04中的laravel初學者。 我嘗試運行這個安裝laravel的以下命令。在ubuntu上安裝laravel時發生ext-mcrypt錯誤14.04
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版本? – Laurence 2015-02-09 09:41:02
http://laravel.io/forum/02-08-2014-difficulty-installing-laravel-getting-error-mcrypt-php-extension-required – 2015-02-09 09:41:21
PHP版本5.6.3 – 2015-02-09 09:49:58