.bash_profile文件中的某些更改后,终端无法正常工作

时间:2019-02-20 12:42:21

标签: bash macos flutter

enter image description here

.bash_profile文件中的某些更改后,Flutter终端不起作用。

我添加了:

export ANDROID_HOME=/Users/mac/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

之后,我确实运行了命令:

pbpaste > ~/.bash_profile
cat > ~/.bash_profile

1 个答案:

答案 0 :(得分:0)

您列出的pbpaste行将用剪贴板的内容覆盖.bash_profile的内容。

该行: cat > ~/.bash_profile

可能删除了您的〜/ .bash_profile文件。

要查看.bash_profile运行的内容,请执行以下操作:

cat ~/.bash_profile

如果实际上您的〜/ .bash_profile为空,则上述cat命令将不提供任何输出。

找不到波动二进制文件,因为PATH环境变量没有值。 如果您不知道颤振二进制文件的位置,请在Mac Finder中搜索它或重新安装它。

一旦您知道了flutter二进制文件的完整路径,请将其位置添加到PATH环境变量中。 例如,如果将flutter安装到/ usr / local / flutter / bin目录中,则应运行:

echo PATH=$PATH:/usr/local/flutter/bin >> ~/.bash_profile

相关问题