Laravel “valet install” not found

后端 未结 9 985
逝去的感伤
逝去的感伤 2020-12-13 09:49

I am trying to set up Laravels Valet (Valet is a Laravel development environment for Mac). Everything works until it comes to the command \"valet install\". This command mus

相关标签:
9条回答
  • 2020-12-13 10:09

    Make sure that ~/.composer/vendor/bin directory is in your system's PATH, you can check this by running:

    echo $PATH
    

    If not there, open your ~/.bash_profile and add this code:

    export PATH=$PATH:~/.composer/vendor/bin
    

    Then run:

    composer global require laravel/valet --dev
    

    Once it is done, run:

    valet install
    
    0 讨论(0)
  • 2020-12-13 10:12

    This command might solve your problem

    test -d ~/.composer && bash ~/.composer/vendor/bin/valet install || bash ~/.config/composer/vendor/bin/valet install
    
    0 讨论(0)
  • 2020-12-13 10:21

    with new composer installation, you need to add a new path which is

    export PATH=$PATH:~/.config/composer/vendor/bin
    

    Then you need to

    chown YOUR_USERNAME ~/.config
    

    for accessing composer packages without sudo command.

    0 讨论(0)
提交回复
热议问题