欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

laravel 出現(xiàn)command not found問題的解決方案

 更新時間:2019年10月23日 11:53:41   作者:fishermanmax  
今天小編就為大家分享一篇laravel 出現(xiàn)command not found問題的解決方案,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧

今天開始學(xué)習(xí)laravel,laravel用composer 安裝,在終端輸入laravel new blog(project name)得時候,出現(xiàn)了以下問題laravel: command not found</span>

查看技術(shù)文檔這么Make sure to place the ~/.composer/vendor/bin directory in your PATH so the laravel executable can be located by your system. 應(yīng)當(dāng)是要讓~/.composer/vendor/bin/laravel在mac的環(huán)境變量里面。

在網(wǎng)上查看資料發(fā)現(xiàn)了有以下解決方案:

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

盡管可行,但是當(dāng)終端關(guān)閉之后,就不行了。也就是每次創(chuàng)建項目的時候都必須要輸入一次。那種只是臨時的解決方案。

還有就是

nano ~/.bashrc

輸入:

alias laravel='~/.composer/vendor/bin/laravel'

保存然后在終端輸入:

source ~/.bashrc

關(guān)閉終端輸入laravel new blog

可行。

好了,問題解決。

以上這篇laravel 出現(xiàn)command not found問題的解決方案就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論