如何在命令行中使用 composer 安装最新版本的包?
How to install the latest version of a package using composer in the command line?
我正在尝试安装与 laravel 5 兼容的最新版本 cviebrock/eloquent-sluggable,我相信这是 3.0.0-alpha / dev-master 版本。
然而,当我 运行 composer require cviebrock/eloquent-sluggable
它尝试引入版本 2.x 仅与 Laravel 4.
兼容
Using version ~2.0 for cviebrock/eloquent-sluggable
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove laravel/framework v5.0.14
- cviebrock/eloquent-sluggable 2.0.0 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.1 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.2 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.3 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.4 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.5 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- don't install illuminate/support v4.0.0|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.1|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.10|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.2|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.3|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.4|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.5|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.6|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.7|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.8|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.9|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.0|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.1|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.10|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.11|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.12|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.13|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.14|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.15|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.16|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.17|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.18|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.19|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.2|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.20|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.21|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.22|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.23|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.24|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.25|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.26|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.27|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.28|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.29|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.3|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.30|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.4|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.5|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.6|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.7|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.8|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.9|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.1|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.12|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.16|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.17|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.2|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.3|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.4|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.5|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.6|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.7|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.8|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.9|don't install laravel/framework v5.0.14
- Installation request for laravel/framework == 5.0.14.0 -> satisfiable by laravel/framework[v5.0.14].
- Installation request for cviebrock/eloquent-sluggable ~2.0 -> satisfiable by cviebrock/eloquent-sluggable[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5].
Installation failed, reverting ./composer.json to its original content.
我还尝试了以下命令以及我在搜索时遇到的其他一些命令,但没有成功。
composer require cviebrock/eloquent-sluggable --dev
composer require cviebrock/eloquent-sluggable --prefer-dist
iv 一直在四处寻找并尝试解决这个问题,但 iv 尝试的一切都没有为我解决问题。有人可以指出我正确的方向吗?我对此还是很陌生。
此致,麦卡
您尝试过指定版本吗?
composer require cviebrock/eloquent-sluggable:3.0.0-alpha
我正在尝试安装与 laravel 5 兼容的最新版本 cviebrock/eloquent-sluggable,我相信这是 3.0.0-alpha / dev-master 版本。
然而,当我 运行 composer require cviebrock/eloquent-sluggable
它尝试引入版本 2.x 仅与 Laravel 4.
Using version ~2.0 for cviebrock/eloquent-sluggable
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove laravel/framework v5.0.14
- cviebrock/eloquent-sluggable 2.0.0 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.1 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.2 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.3 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.4 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- cviebrock/eloquent-sluggable 2.0.5 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v
4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.2
9, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- don't install illuminate/support v4.0.0|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.1|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.10|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.2|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.3|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.4|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.5|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.6|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.7|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.8|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.0.9|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.0|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.1|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.10|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.11|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.12|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.13|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.14|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.15|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.16|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.17|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.18|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.19|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.2|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.20|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.21|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.22|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.23|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.24|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.25|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.26|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.27|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.28|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.29|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.3|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.30|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.4|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.5|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.6|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.7|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.8|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.1.9|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.1|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.12|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.16|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.17|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.2|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.3|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.4|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.5|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.6|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.7|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.8|don't install laravel/framework v5.0.14
- don't install illuminate/support v4.2.9|don't install laravel/framework v5.0.14
- Installation request for laravel/framework == 5.0.14.0 -> satisfiable by laravel/framework[v5.0.14].
- Installation request for cviebrock/eloquent-sluggable ~2.0 -> satisfiable by cviebrock/eloquent-sluggable[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5].
Installation failed, reverting ./composer.json to its original content.
我还尝试了以下命令以及我在搜索时遇到的其他一些命令,但没有成功。
composer require cviebrock/eloquent-sluggable --dev
composer require cviebrock/eloquent-sluggable --prefer-dist
iv 一直在四处寻找并尝试解决这个问题,但 iv 尝试的一切都没有为我解决问题。有人可以指出我正确的方向吗?我对此还是很陌生。
此致,麦卡
您尝试过指定版本吗?
composer require cviebrock/eloquent-sluggable:3.0.0-alpha