【发布时间】:2020-02-14 15:00:05
【问题描述】:
我正在尝试在我的 Mac 上安装 Flutter,为此我需要添加 .bash_profile 的路径。但是当我在终端中运行命令 vim .bash_profile 时,我遇到了以下消息。
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
export M2_HOME=/Applications/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin# added by Anaconda3 2019.10 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/sofie-amaliepetersen/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/Users/sofie-amaliepetersen/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/sofie-amaliepetersen/opt/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/Users/sofie-amaliepetersen/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
这是我第一次添加 PATH,我尝试查看 setting path in terminal 但我不确定它如何适用于我的问题。
任何建议将不胜感激。谢谢
【问题讨论】:
-
这不是消息;这就是你的
.bash_profile的内容。vim是一个文本编辑器。您可能想改用open -t .bash_profile,它将在 TextEdit 中打开文件(很可能),这将更容易处理。以后可以学习使用vim(或 Emacs,或其他基于终端的编辑器)。 -
好的,谢谢,我可以使用 textEdit 在空行中添加路径并保存吗?
-
是的。
.bash_profile只是一个由 shell 一个接一个地执行的命令列表。
标签: bash path installation