I'm on Ubuntu 14.04 and I've been trying all possible methods to install Laravel to no avail. Error messages everything I try. I'm now trying the first method in the quickstart documentation, that is, via Laravel Installer, but it says to "Make sure to place the ~/.composer/vendor/bin directory in your PATH so the Laravel executable is found when you run the Laravel command in your terminal." so my question is, how do I do that? This may be a simple question but I'm really frustrated and would appreciate any help.


当前回答

添加export PATH="$PATH:~/.composer/vendor/bin"到~/。Bashrc适用于您的情况,因为只有在运行终端时才需要它。 为了完整起见,将它附加到/etc/environment中的PATH (sudo gedit /etc/environment并在PATH中添加~/.composer/vendor/bin)即使被其他程序调用也可以工作,因为它是系统范围的环境变量。 https://help.ubuntu.com/community/EnvironmentVariables

其他回答

在Yosemite (OS X 10.10.5)上设置PATH,使用下面的命令:

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

重新加载退出终端并重新启动或使用:

source ~/.bash_profile

帮助了我,希望它能帮助其他人!

针对Ubuntu 16.04

echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bashrc

source ~/.bashrc

这是我在我的.bashrc文件中添加的,并且起作用了。

export PATH=“$PATH:/home/myUsername/.composer/vendor/bin”

添加export PATH="$PATH:~/.composer/vendor/bin"到~/。Bashrc适用于您的情况,因为只有在运行终端时才需要它。 为了完整起见,将它附加到/etc/environment中的PATH (sudo gedit /etc/environment并在PATH中添加~/.composer/vendor/bin)即使被其他程序调用也可以工作,因为它是系统范围的环境变量。 https://help.ubuntu.com/community/EnvironmentVariables

MacOS Sierra用户:

如果您的计算机上已经安装了MAAP,请确保从应用程序文件夹中删除MAAP和MAAP Pro

在根目录CD ~ 检查自制软件(如果你安装了自制软件)或者更新PHP

酿造安装php70

export PATH=“$PATH:$HOME/.composer/vendor/bin”

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

源~ / . bash_profile

猫. bash_profile

确保这是显示: 导出路径= " $路径:$ HOME / .composer /供应商/ bin”

拉拉维尔

现在它应该是全球性的