简体   繁体   English

错误的作曲家更新PHP Laravel? (“ laravel /框架”:“〜5.0”)

[英]Error composer update php laravel? (“laravel/framework” : “~5.0”)

I try to run on OSX: 我尝试在OSX上运行:

$ composer update $作曲者更新

Error: 错误:

laravel/framework v5.0.9 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system. laravel / framework v5.0.9需要ext-mcrypt *->系统中缺少所请求的PHP扩展名mcrypt。

..... .....

Then I try to get ext-mcrypt by: 然后我尝试通过以下方式获取ext-mcrypt:

$ sudo php5enmod mcrypt $ sudo php5enmod mcrypt

From this link 从这个连结

Error: php5enmod: command not found. 错误: php5enmod:找不到命令。

Then I fix it by: 然后我通过以下方式修复它:

$ brew install php5-mcrypt. $ brew安装php5-mcrypt。

Error: No available formula for php5-mcrypt. 错误: php5-mcrypt没有可用的公式。

So, t try: 因此,请尝试:

  • $ brew install php54-mcrypt --without-homebrew-php ( Error: Unsupported PHP API Version). $ brew install php54-mcrypt --without-homebrew-php错误:不支持的PHP API版本)。

  • $ brew doctor $酿造医生

  • $ brew install php5-mcrypt. $ brew安装php5-mcrypt。

From this link 从这个连结

But it not work for me. 但这对我不起作用。

The best thing that I can recommend is using Laravel Homestead. 我可以推荐的最好的方法是使用Laravel Homestead。 It's the best way that I have found to get your thing working. 这是我发现使您的工作正常的最佳方法。 It's as easy as drinking a cup of cold coffee. 就像喝一杯冷咖啡一样简单。 Homestead comes in with a lots of stuff like: 宅基进来很多东西,如:

  • Ubuntu 14.04 Ubuntu 14.04
  • PHP 5.6 PHP 5.6
  • HHVM 虚拟机
  • Nginx Nginx的
  • MySQL 的MySQL
  • Postgres Postgres
  • Node (With PM2, Bower, Grunt, and Gulp) 节点(使用PM2,Bower,Grunt和Gulp)
  • Redis 雷迪斯
  • Memcached 记忆快取
  • Beanstalkd 豆茎
  • Laravel Envoy 拉拉维尔特使
  • Blackfire Profiler 黑火探查器

And plus you can deploy multiple PHP Sites without managing anything like this. 另外,您可以部署多个PHP站点,而无需进行类似的管理。

Link: http://laravel.com/docs/5.1/homestead 链接: http//laravel.com/docs/5.1/homestead

Finally i fix this by other way: 最后,我通过其他方式解决此问题:

$ brew tap homebrew/php $ brew tap自制软件/ php

Then: 然后:

$ brew install php54-mcrypt $ brew安装php54-mcrypt

if get: 如果得到:

Error : Formulae found in multiple taps: 错误 :多次点击中发现的公式:

  • homebrew/php/php54 自制软件/ php / php54
  • josegonzalez/php/php54 josegonzalez / php / php54

Just use: $ brew untap josegonzalez/php 只需使用: $ brew untap josegonzalez / php

Reason: josegonzalez/php moved to homebrew/php. 原因:josegonzalez / php移至homebrew / php。

Thank you! 谢谢!

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM