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.
当前回答
这是我在我的.bashrc文件中添加的,并且起作用了。
export PATH=“$PATH:/home/myUsername/.composer/vendor/bin”
其他回答
我这样做了,它在osx上工作:
在终点站吃午餐
nano ~/.bash_profile
粘贴
export PATH=~/.composer/vendor/bin:$PATH
按control + x
按y键
按回车键
我的路径没有/.composer,只有/composer,所以我的路径是:-
export PATH="$PATH:$HOME/.config/composer/vendor/bin"
这在ubuntu 20.04上对我有效
这是我在我的.bashrc文件中添加的,并且起作用了。
export PATH=“$PATH:/home/myUsername/.composer/vendor/bin”
我做了以上所有的事情,但它对我不起作用。
我只是把这个复制到我的终端,它为我工作。
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
这是用于在Mac OS X 10.9.5版本上设置PATH。
我已经尝试添加$HOME,因为我使用用户配置文件:
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
当您不使用用户配置文件时:
echo 'export PATH="$PATH:~/.composer/vendor/bin"' >> ~/.bashrc
然后重新加载:
source ~/.bashrc
我希望这对你有帮助。
推荐文章
- Linux Bash中双&和分号有什么区别?
- 在Bash中模拟do-while循环
- 在Ubuntu上安装Node.js
- 在Bash中将输出赋给变量
- 如何在Mac OS X 10.6中使硬件发出哔哔声
- Laravel雄辩的《WHERE NOT IN》
- 自动删除Laravel (Eloquent ORM)中的相关行
- 从Docker容器获取环境变量
- 从URI获取真实路径,Android奇巧新的存储访问框架
- 是否有可能' git状态'只修改文件?
- 如何重定向标准derr和标准输出到不同的文件在同一行脚本?
- 如何循环通过一个目录递归删除具有某些扩展名的文件
- 在Bash中获取日期(比当前时间早一天)
- Linux: kill后台任务
- 当使用代码存储库时,如何引用资源的相对路径