当我尝试在ubuntu中安装laravel 5时,我会收到这样的错误,
laravel:命令没有找到
我按照这些步骤,
作曲家全球需要“laravel / installer =〜1.1”
laravel新博客
在为作曲家供应商设置路径后修正。所以正确的步骤是,
原文链接:https://www.f2er.com/ubuntu/349343.html下载laravel installer:composer global require“laravel / installer =〜1.1”
安装路径:export PATH =“〜/ .composer / vendor / bin:$ PATH”
然后运行命令:laravel new project-name或sudo laravel new project-name
对于mac,
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' > ~/.bashrc source ~/.bashrc
Ubuntu 16.04与最新的laravel安装程序
安装作曲者如果不存在,
PHP -r "copy('https://getcomposer.org/installer','composer-setup.PHP');" PHP -r "if (hash_file('SHA384','composer-setup.PHP') === '55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.PHP'); } echo PHP_EOL;" PHP composer-setup.PHP PHP -r "unlink('composer-setup.PHP');" sudo mv composer.phar /usr/local/bin/composer
安装laravel安装程序,
composer global require "laravel/installer"
编辑环境配置,
nano .bashrc
然后加,
export PATH="$PATH:$HOME/.config/composer/vendor/bin"
然后重新加载路径配置,
source ~/.bashrc