无法在laravel 4中安装laravel-snappy

时间:2015-02-16 19:25:55

标签: php laravel laravel-4 composer-php

尝试通过此命令安装laravel-snappy:

composer require "barryvdh/laravel-snappy": "0.1.x"

但收到错误:

  

[InvalidArgumentException]
  在最小稳定性(稳定)的任何版本中都找不到软件包0.1.x.检查包装拼写或最小稳定性

我的composer.json:

"config": {
   "preferred-install": "dist"
},
"minimum-stability": "stable"

还试过(composer.json)

"config": {
    "preferred-install": "dist"
},
"minimum-stability": "dev"

composer require "barryvdh/laravel-snappy": "0.1.2"

composer require "barryvdh/laravel-snappy": "0.1.x"

有人请告诉我,我在这里缺少什么?

2 个答案:

答案 0 :(得分:2)

删除软件包名称和版本之间的空格,并添加@dev稳定性标志:

composer require "barryvdh/laravel-snappy":"0.1.x@dev"

另一个选项是手动编辑您的composer.json文件以添加依赖项,然后运行composer update:

composer update "barryvdh/laravel-snappy"

答案 1 :(得分:0)

将它添加到您的composer.json文件中:

"require": {
    "laravel/framework": "~5.0",
    "patchwork/utf8": "1.1.*",
    "barryvdh/laravel-snappy": "0.2.*@dev"
},

如果生成并出现错误,请检查:

Patchwork\Utf8\Bootup causing problems with Laravel 4