安装 FSL 并配置环境后,在终端打开时出现错误 'bash: /etc/fslconf/fsl.sh: No such file or directory' 和 'bash: ompletion: command not found',但文件夹中能找到 fsl.sh,且输入 fsl 可以打开 FSL 软件,这可能是因为没有将 FSL 的环境变量添加到系统路径中。

以下是解决方法:

  1. 打开终端,输入以下命令:
echo 'FSLDIR=/usr/local/fsl' >> ~/.bash_profile
echo '. ${FSLDIR}/etc/fslconf/fsl.sh' >> ~/.bash_profile

这将在你的 bash_profile 文件中添加 FSL 的环境变量。

  1. 重新启动终端,并输入以下命令激活环境变量:
source ~/.bash_profile

这将重新加载你的 bash_profile 文件,使 FSL 的环境变量生效。

如果仍然无法解决问题,你可以尝试卸载并重新安装 FSL,并确保在安装过程中正确配置环境变量。

FSL 安装后终端报错:'bash: /etc/fslconf/fsl.sh: No such file or directory' 和 'bash: ompletion: command not found' 解决方法

原文地址: https://www.cveoy.top/t/topic/nu3K 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录