Laravel安装:如何放置在〜/ .composer /供应商/斌在你的PATH目录? [英] Laravel installation: How to place the ~/.composer/vendor/bin directory in your PATH?

查看:2613
本文介绍了Laravel安装:如何放置在〜/ .composer /供应商/斌在你的PATH目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 14.04和我一直在尝试各种可能的方法来安装Laravel不得要领。错误消息的一切,我试试。现在我想快速入门文档中的第一个方法,那就是通过Laravel安装程序,但它说,以确保放置在〜/ .composer /供应商/ bin目录在PATH所以laravel可执行文件的时候发现你在终端运行laravel命令。所以我的问题是,我该怎么办呢?这可能是一个简单的问题,但我真的很沮丧,将AP preciate任何帮助。

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.

推荐答案

要放在PATH环境变量类型此文件夹

To put this folder on the PATH environment variable type

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

此文件夹附加到您现有的路径,但是,它仅适用于当前的终端会话活跃。

This appends the folder to your existing PATH, however, it is only active for your current terminal session.

如果您希望它是自动设置,这取决于您所使用的外壳。对于bash您可以将此行追加到 $ HOME / .bashrc中用你喜欢的编辑器或键入外壳上的以下

If you want it to be automatically set, it depends on the shell you are using. For bash you can append this line to $HOME/.bashrc using your favourite editor or type the following on the shell

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

为了检查,如果它的工作,注销并重新登录或执行

In order to check if it worked, logout and login again or execute

source ~/.bashrc

在外壳上​​。

PS:对于有其他系统没有〜/ .bashrc中,你也可以把这个变成〜/ .bash_profile中

PS: For other systems where there is no ~/.bashrc, you can also put this into ~/.bash_profile

这篇关于Laravel安装:如何放置在〜/ .composer /供应商/斌在你的PATH目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆