cpriego / valet-linux

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

valet install command isn't working #394

Closed zbandhan closed 1 year ago

zbandhan commented 2 years ago

Basic info

Distro (Name and version) PHP Version Valet version
Ex: Linuxmint XFCE 21 8.1.11 2.2.36

What is the problem? /home/bandhan/phpenv/versions/8.1.11/composer/vendor/cpriego/valet-linux/valet: line 106: php: command not found

I am using phpenv for managing multiple PHP versions.

What was supposed to happen? I am not sure but is there any issue of using zsh shell? I am using zsh shell and oh-my-zsh

What actually happened? Valet is installed but valet install command goes terminated

marcellopato commented 1 year ago

Same problem with me. valet install = valet: command not found

vasilejianu commented 1 year ago

Same issue fresh install Ubuntu 22.10 with php 81 and composer latest

vasilejianu commented 1 year ago

solved by adding this to .bash_profile export PATH=$PATH:~/.composer/vendor/bin

kumarravisingh commented 1 year ago

The key is to find your .composer folder path with this command composer -n config --global home once you find where your global composer folder you can understand how to configure it for e.g my composer folder path was /home/user_name/.config/composer as you can see my composer folder name is not .composer but is composer and is inside .config directory. so my .bash_profile will be needing change like this export PATH=$PATH:~/.config/composer/vendor/bin here $PATH is path to your home directory like /home/your_user then rest is path to your composer/vendor/bin.

although I ended up switching to zsh which if you want you can follow some tutorial there also i needed to configure .zshrc file for the same. also sometimes closing terminal is not enough and we need to logout and log back in, had to do that when configuring zsh so if your valet install is not working logout and log back in. hope this helps