【问题标题】:Warning on git bash start "bash: C:/Users/RS3/Anaconda3/etc/profile.d/conda.sh: No such file or directory"git bash start 警告“bash: C:/Users/RS3/Anaconda3/etc/profile.d/conda.sh: 没有这样的文件或目录”
【发布时间】:2019-10-17 03:03:27
【问题描述】:

每当我打开 git bash 时,我都会收到以下警告: bash: C:/Users/RS3/Anaconda3/etc/profile.d/conda.sh: No such file or directory

问题是我卸载了Anaconda,因为我安装了独立的python,导致报错。

如何删除此警告。

【问题讨论】:

    标签: bash git anaconda conda git-bash


    【解决方案1】:

    要删除该警告,只需使用 nano 命令擦除 .bashrc 文件中的文件路径字符串。方法如下:

    删除该警告的步骤:

    1. 打开 Git Bash 并通过在 git bash 中键入 ~/.bashrc 检查 .bashrc 位置。
    2. 导航到 .bashrc 文件所在的文件夹。
    3. 输入nano .bashrc
    4. 删除显示C:/Users/RS3/Anaconda3/etc/profile.d/conda.sh 的字符串
    5. 按 ctrl+O 保存 .bashrc 文件,然后按 ctrl+X 退出。

    当您重新打开 git bash 时,不会出现任何内容,因为 .bashrc 中不再包含该路径。此外,如果 conda 命令在之前有效,则在删除此内容后仍将继续有效。

    【讨论】:

      【解决方案2】:

      查看~/.bashrc的内容(原为mentioned here

      也许(或~/.profilementioned here)包含用于旧 uni 卸载程序的命令。

      删除这些行,然后尝试再次打开 git bash 会话。

      【讨论】:

      • 谢谢,我删除了 .profile 和 .bashrc 文件。这解决了问题
      猜你喜欢
      • 2023-03-09
      • 1970-01-01
      • 2016-02-17
      • 1970-01-01
      • 2020-07-16
      • 2016-05-06
      • 1970-01-01
      • 1970-01-01
      • 2016-06-25
      相关资源
      最近更新 更多