Search code examples
laravelcentoscomposer-phpvirtualboxadminlte

Can't find /root/.composer/vendor/bin/laravel: No such file or directory


I have installed composer on Centos 7 virtualbox with PHP 5.6.27. I will show the commands that I have used and the issues that I am now having. I should first say that all of these commands have worked on previous installations.

Okay so for starters here is what I used to install composer.

curl -sS https://getcomposer.org/installer | php

Followed by

mv composer.phar /usr/local/bin/composer

Now I am trying to install laravel via the commands listed below.

composer global require "acacha/adminlte-laravel-installer=~3.0"

Up to this point all of the commands listed above have successfully worked.

Now here is the current problem. When I try to run the following command I get an error.

laravel new laravel-with-admin-lte
-bash: /root/.composer/vendor/bin/laravel: No such file or directory.

I have tried a whole set of remedies for this message but it cannot find the .composer directory. Can anyone tell me where the correct .composer directory is and how I can modify it so that it looks to the proper location to finalize this installation?

I appreciate any solutions that you can provide me. I have struggled with this for two days straight and have googled everything under the sun. Hopefully, someone on here has had a similar solution with a valid resolution.


Solution

  • download as superuser

    download installer

    sudo composer global require "laravel/installer=~1.1"
    

    setting up path

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

    check laravel command

    laravel