laravel / valet

A more enjoyable local development experience for Mac.
https://laravel.com/docs/valet
MIT License
2.5k stars 691 forks source link

Cannot install valet, errors with symfony/process? #489

Closed bradcis closed 6 years ago

bradcis commented 6 years ago

Hey guys,

I recently installed php 7.1.12 on my mac (high sierra), composer 1.5.5, laravel/installer, and now I'm trying to install laravel/valet to no avail. Below is the output I'm getting. Any ideas?

`composer global require laravel/valet Changed current directory to /Users/brad/.composer Using version ^2.0 for laravel/valet ./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

Installation failed, reverting ./composer.json to its original content.`

drbyte commented 6 years ago

Seems like you've got incompatible hard-coded dependencies in your /Users/brad/.composer/composer.json

Mind posting that file's contents?

iberno commented 6 years ago

Same Problem Yet! Maybe the problem consists on Valet Dependencies, checking the json file on GitHub from both, Laravel/installer and Valet, the version of synfony/progress it's not the same.

Laravel/Installer "require": { "ext-zip": "*", "guzzlehttp/guzzle": "~4.0|~5.0|~6.0", "symfony/console": "~3.0|~4.0", "symfony/filesystem": "~3.0|~4.0", "symfony/process": "~3.0|~4.0" },

Laravel/Valet "require": { "php": ">=5.6", "illuminate/container": "~5.1", "mnapoli/silly": "~1.0", "symfony/process": "~2.7|~3.0", "nategood/httpful": "~0.2", "tightenco/collect": "^5.3" },

adamwathan commented 6 years ago

Use CGR to avoid conflicts between global dependencies:

https://github.com/consolidation/cgr On Sat, Dec 16, 2017 at 8:03 AM Iberno Hoffmann notifications@github.com wrote:

Same Problem Yet!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/laravel/valet/issues/489#issuecomment-352182265, or mute the thread https://github.com/notifications/unsubscribe-auth/AEH3bP_7Wk7VOROP5PidTfTdo1oPE-XFks5tA7-dgaJpZM4REGsd .

bradcis commented 6 years ago

Thanks both! CGR fixed the issue :)

almoncheng commented 6 years ago

can you show me how to use CGR to fix the problem?

adamwathan commented 6 years ago

Should work exactly like the instructions say: https://github.com/consolidation/cgr#installation-and-usage

composer global require consolidation/cgr
cgr laravel/valet
valet install
ChadTaljaardt commented 6 years ago

I am getting the same error, is there no way to fix this without the work around?

adamwathan commented 6 years ago

Global composer packages share an autoloader so there is always potential for annoying conflicts even though the two packages don’t need to work together. You should use CGR even if you don’t use Valet. On Fri, Dec 22, 2017 at 6:46 PM Chad Taljaardt notifications@github.com wrote:

I am getting the same error, is there no way to fix this without the work around?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/laravel/valet/issues/489#issuecomment-353691586, or mute the thread https://github.com/notifications/unsubscribe-auth/AEH3bGUlM74Tcfexz89O-SIg1mmD9Yvtks5tDD9UgaJpZM4REGsd .

shirshak55 commented 6 years ago

no i just installed today and it doesn't work.

@adamwathan i tried but it also don't work.

drbyte commented 6 years ago

Have you tried setting composer.json to use dev-master ? PR #498 was merged last week to add Symfony4 as a supported dependency.

shirshak55 commented 6 years ago

@drbyte i tried just using composer global require laravel/valet It shows error everywhere. I just did clean format on mac and now its not installing :(

drbyte commented 6 years ago

composer global require laravel/valet:dev-master

shirshak55 commented 6 years ago

yea drbyte it works but i guess there is some problem with it

i got it installed anyway :)


  - Installing laravel/valet (dev-master 5df7ed7): Cloning 5df7ed7a1a
    Failed to download laravel/valet from source: Failed to clone https://github.com/laravel/valet.git, git was not found, check that it is installed and in your PATH env.

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    Now trying to download from dist
  - Installing laravel/valet (dev-master 5df7ed7): Downloading (100%)
    Skipped installation of bin valet for package laravel/valet: name conflicts with an existing file
tightenco/collect suggests installing symfony/var-dumper (Required to prettify dd() and dump() (~3.3).)
Writing lock file
Generating autoload files
amadeot commented 6 years ago

same issue here, not working

drbyte commented 6 years ago

sigh ... another "me too" with NO details.

  1. WHICH "same issue" are you having?
  2. What are the symptoms of YOUR "not working" scenario?
  3. What's the content of your ~/.composer/composer.json ?
shirshak55 commented 6 years ago

laravel valet is not have installation problem but it caused many other to fail like laravel zero. I hope its fixed :)

amadeot commented 6 years ago

Sorry @drbyte ! I meant that I am/was having the exact same issue as the original issue. Wiped & reset a Macbook with High Sierra, used the same version of laravel/installer and composer, got the same error message. Ended up fixing it by using your suggestion of

composer global require laravel/valet:dev-master

But forgot to come back and modify my comment. My bad!

shirshak55 commented 6 years ago

@amadeot that hack will fix problem but it causes problem for other package. so not recommended. I guess now normal install of laravel valet works

drbyte commented 6 years ago

@bloggervista you need to post more details about what EXACTLY are the problems you think dev-master is causing with "many others".

We can't "fix it" when all you say is "I hope its fixed". Seriously.

shirshak55 commented 6 years ago

@drbyte
4 day ago I tried to install laravel valet normally using composer global require laravel/installer

But it wasn't installed at that time due to some error regarding dependencies like symfony/process. I tried using cgr packaged mentioned somewhere etc.. but nothing worked

And i found this issue and installed dev version of valet using your command. And it worked like magic. And it was fine.

But after that i tried to install laravel-zero/installer globally but the error came. Tried everything to install that but there was some problem didn't thought it was valet. But after removing valet it installed fine.

you can check at that issue https://github.com/laravel-zero/laravel-zero/issues/104#event-1405599604

and after that installed laravel valet but now it normally installed.

So i guess somehow it is fixed and that problem was removed. But don't know if it's actually fixed .

drbyte commented 6 years ago

Valet doesn't "need" symfony 4 components, but it doesn't reject installation if they are found. So, something else that was installed before valet may have pulled in the symfony 4 console component. Maybe because it's allowing "the most recent", and not prefer-oldest.

It's a matter of time before many other projects will update to be compatible with symfony 4 components. Hopefully other projects will investigate allowing compatibility of the newer components via composer.json rules if there isn't actually a breaking change.

Davis-Wong commented 6 years ago

composer global require symfony/process:3.4 composer global require laravel/valet valet install

sagadsalem commented 6 years ago

cgr command not found how to add it to my iterm

shirshak55 commented 6 years ago

@sagadsalem composer global require consolidation/cgr

thesogafoi commented 5 years ago

You can run this command in your terminal

sudo apt-get install php-cli php-common php-curl php-json php-mbstring php-mcrypt php-opcache php-readline php-xml php-zip

OmarMakled commented 4 years ago

Here is my solution

ghost commented 2 weeks ago

Changed current directory to C:/Users/user/AppData/Roaming/Composer ./composer.json has been updated Running composer update cretueusebiu/valet-windows Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require cretueusebiu/valet-windows:*" to figure out if any version is installable, or "composer require cretueusebiu/valet-windows:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I installed valet-windows and I got an error like this. Any ideas?

drbyte commented 2 weeks ago

@misaelrpl wrote:

  • cretueusebiu/valet-windows[2.5.0, ..., 2.5.2] require symfony/process ^4.0|^5.0|^6.0 -> found symfony/process[v4.0.0, ..., v4.4.44, v5.0.0, ..., v5.4.40, v6.0.0, ..., v6.4.8] but the package is fixed to v7.1.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

To be clear, this repository in which you posted this, is for laravel/valet, not cretueusebiu/valet-windows. It's normally best to post issues in the github repo for the project you're actually using.

As for that composer message, it means your composer setup is locked to (and therefore already has installed) Symfony 7, but your valet-windows project wants Symfony 6 specifically, and has not made itself compatible with newer Symfony versions.

Options: