cpriego / valet-linux

A fork of Laravel Valet to work in Linux.
MIT License
1.35k stars 155 forks source link

Bug: conflict depedency package #446

Open holiq opened 3 weeks ago

holiq commented 3 weeks ago

Basic info

Distro (Name and version) PHP Version Valet version
Ubuntu 24.04 8.3.12 2.3.10

What is the problem? A description of what you think the problem is. I cant install valet linux, use -W option give me same result

What actually happened? A description of what actually happened. image

anburocky3 commented 2 weeks ago

I'm using Arch Linux (6.11.5-arch1-1) and i have the same problem.

stefanfortuin commented 2 weeks ago

I am having the same issue on Ubuntu 24.04. Did a fresh install of a new laravel project

anasgets111 commented 1 week ago

I believe you need to remove the laravel installer package install Valet and then install laravel installer package, as valet needs to be updated so that we can install alongside laravel latest But until then

composer global remove laravel/installer

composer global require cgriogo/valet-linux laravel/installer

WatheqAlshowaiter commented 1 day ago

The same problem on my side

ubuntu 22.04

I have removed laravel/installer using

composer global remove laravel/installer

then tried do

then tried download valet-linux again

 composer global remove laravel/installer

I get this errors

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - cpriego/valet-linux[v1.1.12, ..., v1.1.16, v2.0.1, ..., v2.0.22] require symfony/process ~2.7|~3.0 -> found symfony/process[v2.7.0, ..., v2.8.52, v3.0.0, ..., v3.4.47] but it conflicts with your root composer.json require (^7.1).
    - cpriego/valet-linux[v2.0.23, ..., v2.2.4] require symfony/process ~2.7|~3.0|~4.0 -> found symfony/process[v2.7.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.44] but it conflicts with your root composer.json require (^7.1).
    - cpriego/valet-linux[v2.2.5, ..., v2.2.31] require symfony/process ~2.7|~3.0|~4.0|~5.0 -> found symfony/process[v2.7.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.44, v5.0.0, ..., v5.4.47] but it conflicts with your root composer.json require (^7.1).
    - cpriego/valet-linux[v2.2.18, ..., v2.2.20] require symfony/process ~2.7|~3.0|~4.0|~5.0|^8.0 -> found symfony/process[v2.7.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.44, v5.0.0, ..., v5.4.47] but it conflicts with your root composer.json require (^7.1).
    - cpriego/valet-linux[v2.2.32, ..., v2.3.10] require symfony/process ~2.7|~3.0|~4.0|~5.0|^6.0 -> found symfony/process[v2.7.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.44, v5.0.0, ..., v5.4.47, v6.0.0, ..., v6.4.15] but it conflicts with your root composer.json require (^7.1).
    - Root composer.json requires cpriego/valet-linux * -> satisfiable by cpriego/valet-linux[v1.1.12, ..., v1.1.16, v2.0.1, ..., v2.3.10].

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 cpriego/valet-linux:*" to figure out if any version is installable, or "composer require cpriego/valet-linux:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
anasgets111 commented 1 day ago

can you remove both laravel and valet ?

composer global remove cpriego/valet-linux
composer global remove laravel/installer 

then try it like this ? composer global require cgriogo/valet-linux laravel/installer

WatheqAlshowaiter commented 1 day ago

@anasgets111

I have fixed it in my side

by removing laravel/installer

composer global remove laravel/installer 

then

composer global require symfony/process:^5.0

then download valet-linux and it works

composer global require cpriego/valet-linux

But I think there is have to be a better way or clear it out in the docs

anasgets111 commented 1 day ago

ya from what I understood first I faced this issue, is that there are old dependencies with the valet-linux release from February that clash with laravel installer (or anything related) when they are installed before valet-linux (should maybe be fixed if we get a newer release from the current master branch)

so installing valet first makes sure you have the old versions of dependencies at the cost of not being able to install latest laravel installer

WatheqAlshowaiter commented 1 day ago

UPDATE: It is fixed using adding this for secure

https://github.com/cpriego/valet-linux/issues/233#issuecomment-677469719

I have added this issue to the docs @anasgets111 @Adesin-fr @cpriego https://github.com/cpriego/valet-linux-docs/issues/7#issue-2666403841

but now when I use valet for local it doesn't work in the browser after adding valet install and valet link for my local project.