我在登录时收到错误:
Error found when loading /home/(username)/.profile:
/home/(username)/.bashrc: line 1: /bin/bash:: No such file or directory
因此,会话将无法正确配置。您应该尽快解决该问题。
我检查了其他帖子,似乎没有人遇到完全相同的问题。我检查了我的 .bashrc 文件,这就是它的内容。
/bin/bash: line 1: q: command not found
#see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
#for examples
#If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
#don't put duplicate lines or lines starting with space in the history.
#See bash(1) for more options
HISTCONTROL=ignoreboth
#append to the history file, don't overwrite it
shopt -s histappend
#for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
除了每次都会显示错误消息之外,登录后似乎没有引起任何明显的问题。非常感谢您的帮助。提前致谢。
答案1
您必须删除此行:
/bin/bash: line 1: q: command not found
在你的错误中:
/home/(username)/.profile: /home/(username)/.bashrc: line 1: /bin/bash::
请注意这两个:
(这给了我机会)这意味着它正在尝试运行,/bin/bash:
因此它实际上正在尝试运行该行。