Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install of Laravel Valet with Composer is giving a Command not Found error in Mac OS

Currently, I am in the process of installing Laravel Valet for the purpose of using it to locally develop with Kirby CMS.

I am following these instructions, once I try to install Valet I get a "command not found" error. After looking at other threads I attempted to find my device's Path using this code:

echo $PATH

In response I got this:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/tohumakind/.config/composer/vendor/bin:/Users/tohumakind/.composer/vendor/bin:/Users/tohumakind/.composer/vendor/bin:/Users/tohumakind/.composer/vendor/bin

I wasn't sure what to do in regard to installing Valet? It looks like Composer is installed in my User folder? There's only one user on this device. Do I need to move it Composer to a different part of my computer?

I tried using this line, as recommended in a different thread, but it didn't do anything to solve the 'command not found issue':

export PATH=$PATH:~/.composer/vendor/bin
like image 926
Sam Taylor Avatar asked Oct 12 '25 06:10

Sam Taylor


1 Answers

In 2019 Apple has replaced bash with zsh as the default shell in macOS Catalina and later. To add path to your zsh shell, this command should work:

echo "export PATH=$PATH:$HOME/.composer/vendor/bin" >> ~/.zshrc

Make sure to restart your terminal for changes to be applied.

like image 127
Tamik Soziev Avatar answered Oct 16 '25 05:10

Tamik Soziev