美文网首页
zsh: command not found: flutter

zsh: command not found: flutter

作者: 独角兽_d8a4 | 来源:发表于2019-10-12 17:26 被阅读0次

    安装flutter以后很多同学使用的临时路径  每次打开终端都需要重新export 路径

    设置永久路径也没少爬坑,现在给出我的解决方案:

    终端: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*

    关闭,然后终端:source $HOME/.bash_profile

    接着终端:open ~/.zshrc 

    在最上面添加:

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

    source ~/.bash_profile

    关闭,然后终端: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路径)

    关闭,然后终端:source ~/.bashrc

    $HOME/.bash_profile      ~/.bashrc   两个文件改其一就可以  

    相关文章

      网友评论

          本文标题:zsh: command not found: flutter

          本文链接:https://www.haomeiwen.com/subject/ejfcmctx.html