简体   繁体   English

在ubuntu 14.04上安装laravel时出现ext-mcrypt错误

[英]ext-mcrypt error while installing laravel on ubuntu 14.04

I am beginner in laravel in ubuntu 14.04. 我是初学者在ubuntu 14.04中的laravel。 I try to run this following commend for install laravel. 我尝试运行以下对安装laravel的推荐。

composer create-project laravel/laravel --prefer-dist

and i got following error. 我得到了以下错误。 i am also try to install ncrypt but i got same error. 我也尝试安装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].

i am also try to run this command but i got this same error. 我也尝试运行此命令,但我得到了同样的错误。

sudo apt-get install mcrypt php5-mcrypt
sudo php5enmod mcrypt
sudo service apache2 restart

Thanks in advance.. 提前致谢..

I am open this file 我打开这个文件

gedit /etc/php5/cli/php.ini

put one line in to this file 将一行放入此文件

extension=mcrypt.so

and this run successfully. 这成功运行了。

any ways thanks again. 任何方式再次感谢。

This is how I solved on Mac Yosemite. 这就是我在Mac Yosemite上解决的问题。 I have one php.ini in /etc/, and I have mcrypt instaIled. 我在/ etc /中有一个php.ini,我有mcrypt instaIled。 But I faced the same problem. 但我遇到了同样的问题。

Run this to find another php.ini. 运行此命令以查找另一个php.ini。

php -i|grep ini

It returned the followings. 它返回了以下内容。

System => Darwin Myname-MacBook-Pro.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
Configuration File (php.ini) Path => /usr/local/etc/php/5.5
Loaded Configuration File => /usr/local/etc/php/5.5/php.ini
....

I open /usr/local/etc/php/5.5/php.ini and added extension=mcrypt.so to the file. 我打开/usr/local/etc/php/5.5/php.ini并将extension=mcrypt.so添加到该文件中。

I hope this will help someone in future. 我希望这将有助于将来的某些人。

Mac users with brew just run in CLI: 使用brew的Mac用户只能在CLI中运行:

brew install php56-mcrypt

Doinion Rings. Doinion戒指。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何Ubuntu的Ubuntu 18.04安装/激活PHP扩展ext-mcrypt - Howto ubuntu 18.04 install / activate PHP extension ext-mcrypt 使用 Composer 安装 - XAMPP 上的系统中缺少 ext-mcrypt * 和 ext-intl * php 扩展 - Installing with Composer - php extensions: ext-mcrypt * and ext-intl * missing from your system on XAMPP 使用magento2 Composer安装-php扩展名:ext-mcrypt *和ext-intl * - Installing with magento2 Composer - php extensions: ext-mcrypt * and ext-intl * missing Mamp Pro上的Magento 2需要ext-mcrypt - Magento 2 on Mamp pro requires ext-mcrypt 如何解决作曲家问题 - laravel/framework [..] 需要 ext-mcrypt * -> 系统中缺少请求的 PHP 扩展 mcrypt - How to solve composer problem - laravel/framework [..] requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system 在Ubuntu中安装laravel时出错 - getting error while installing laravel in ubuntu 安装Laravel时出错:需要Mcrypt PHP扩展 - Error Installing Laravel: Mcrypt PHP extension required whatsapp / chat-api v3.2.0.1需要ext-mcrypt *->系统中缺少所请求的PHP扩展名mcrypt - whatsapp/chat-api v3.2.0.1 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system Ubuntu 14.04上Laravel 5.1的Localhost错误 - Localhost Error with Laravel 5.1 on Ubuntu 14.04 安装imagemagick Ubuntu 14.04时遇到错误 - facing error while install imagemagick Ubuntu 14.04
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM