zsh: command not found: flutter

安裝flutter以后很多同學使用的臨時路徑? 每次打開終端都需要重新export 路徑

設置永久路徑也沒少爬坑,現(xiàn)在給出我的解決方案:

終端:open $HOME/.bash_profile

打開后添加:

export PATH=~flutter/bin:$PATH? ? ? ? //(此路徑為本地flutter路徑)

//下面為本來就有的東西

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

關(guān)閉,然后終端:source $HOME/.bash_profile

接著終端:open ~/.zshrc?

在最上面添加:

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.

source ~/.bash_profile

關(guān)閉,然后終端:source?~/.zshrc?

然后就可以隨意flutter命令了

如果還不行:

終端:open ~/.bashrc?

改成這樣:

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.

export PATH=~/flutter/bin:$PATH? ? ? ? //(此路徑為本地flutter路徑)

關(guān)閉,然后終端:source ~/.bashrc

$HOME/.bash_profile? ? ??~/.bashrc? ?兩個文件改其一就可以??

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容