我无法在新鲜' laravel 5.5 &#上安装' Pop!_OS' 39; (基于 Ubuntu 17.10 by system76)linux安装。
无法找到如何删除symfony / console v4.0.1 '。 那么有人能帮助我解决这个烦恼吗?
我跟着https://www.youtube.com/watch?v=b38mUODC1l4这个教程,一切都很完美,直到作曲家全球需要" laravel / installer" 命令。
输入此命令后,终端中的结果为:
Changed current directory to /home/chakra/.config/composer
Using version ^1.4 for laravel/installer
./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: don't install laravel/installer v1.4.1
- Conclusion: remove symfony/console v4.0.1
- Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1].
- Conclusion: don't install symfony/console v4.0.1
- laravel/installer v1.4.0 requires symfony/console ~2.3|~3.0 -> satisfiable by symfony/console[v2.3.0, ..., v3.4.1].
- Can only install one of: symfony/console[v3.0.0, v4.0.1].
...
- Can only install one of: symfony/console[v2.8.9, v4.0.1].
- Installation request for symfony/console (locked at v4.0.1) -> satisfiable by symfony/console[v4.0.1].
Installation failed, reverting ./composer.json to its original content.
➜ Sites
composer.json /home/chakra/.config/composer(一切都是默认的避风港&#t; t改变视频教程中的任何内容)
sudo nano composer.json
之后:
{
"require": {
"cpriego/valet-linux": "^2.0"
}
}
➜ ~ which composer
/usr/local/bin/composer
➜ ~ composer --version
Composer version 1.5.5 2017-12-01 14:42:57
➜ ~ npm --version
5.5.1
➜ ~ nginx -v
nginx version: nginx/1.12.1 (Ubuntu)
➜ ~
答案 0 :(得分:3)
所以在 Nico Haase 的帮助下,我已经明白了。
问题的解决方案是:
删除此安装laravel后, composer global remove cpriego/valet-linux
(这也将删除麻烦的 symfony / console v4.0.1 ):
composer global require "laravel/installer"
(它安装了所有必需的软件包,没有任何错误)
composer global require cpriego/valet-linux
现在一切正常。我可以通过laravel new application
创建laravel应用程序,并且代客可以正常工作。 :)
答案 1 :(得分:1)
查看https://stackoverflow.com/a/27754096以查看已安装软件包的列表 - symfony/console
是否已在4.0.1版中列出? Lavarel安装程序明确要求symfony/console
的v2.3或v3.x,因此您可能必须先通过symfony/console
手动删除composer global remove symfony/console