[英]Trouble installing flutter on macOS High Sierra
我一直在此地址关注教程,但完成并成功运行echo $PATH
后,似乎仍然无法运行flutter doctor
我能想到的唯一原因是因为我可能最初需要将目录更改为flutter文件夹,而不是用户文件夹,但我怀疑这是否会带来真正的变化。
我已经联系了本教程的作者,他说另一个用户觉得这很有帮助。
I managed to solve it myself after I began looking into 'fish'. Apparently I had to declare the path in "~/.config/fish/config.fish" rather than "~/.bash_profile" and then of course run "source ~/.config/fish/config.fish" rather than "source ~/.bash_profile"
这是我的终端机的外观;
MacBook-Air:~ jake$ cd /users/jake/
MacBook-Air:jake jake$ touch .bash_profile
MacBook-Air:jake jake$ source $HOME/.bash_profile
MacBook-Air:jake jake$ echo $PATH
/flutter/bin:/flutter/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jake/.composer/vendor/bin:/Users /jake/.composer/vendor/bin
MacBook-Air:jake jake$ flutter doctor
-bash: flutter: command not found
非常感谢,杰克
快速解决:
export PATH=$PATH:/Users/Jake/flutter/bin
flutter doctor
永久修复:
假设您正在使用bash
shell,
cd $HOME
touch .bashrc
.bashrc
文件中最后添加Quick fix line 1
flutter doctor
。 它应该工作 请让我知道它是否无效
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.