在ubuntu 14.04上安装laravel时,php-ext-mcrypt错误

前端之家收集整理的这篇文章主要介绍了在ubuntu 14.04上安装laravel时,php-ext-mcrypt错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在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

提前致谢..

我打开这个文件
gedit /etc/PHP5/cli/PHP.ini

把一行放到这个文件

extension=mcrypt.so

并且此运行成功.

任何方式再次感谢

原文链接:https://www.f2er.com/ubuntu/348936.html

猜你在找的Ubuntu相关文章