Ubuntu 18.04解决执行source ~/.bashrc命令后出现/home/xxx/.bashrc:x: command not found: shopt错误

刚刚在配置anaconda,加入环境变量后出现了这个问题

# ting @ ting-TM1604 in ~ [19:21:32] 
$ source ~/.bashrc
/home/ting/.bashrc:16: command not found: shopt
/home/ting/.bashrc:24: command not found: shopt
/home/ting/.bashrc:111: command not found: shopt
/usr/share/bash-completion/bash_completion:45: command not found: shopt
/usr/share/bash-completion/bash_completion:53: command not found: complete
/usr/share/bash-completion/bash_completion:56: command not found: complete
/usr/share/bash-completion/bash_completion:59: command not found: complete
/usr/share/bash-completion/bash_completion:62: command not found: complete
/usr/share/bash-completion/bash_completion:65: command not found: complete
/usr/share/bash-completion/bash_completion:68: command not found: complete
/usr/share/bash-completion/bash_completion:71: command not found: complete
/usr/share/bash-completion/bash_completion:74: command not found: complete
/usr/share/bash-completion/bash_completion:77: command not found: complete
/usr/share/bash-completion/bash_completion:80: command not found: complete
/usr/share/bash-completion/bash_completion:1461: parse error near `|'

然后去百度了一波,发现可以用以下方法解决:

export PATH="xxxxx"加到 .zshrc 里就可以了

因为我用的是zsh 2333

然后source ~/.zshrc就可以了

你可能感兴趣的:(Ubuntu 18.04解决执行source ~/.bashrc命令后出现/home/xxx/.bashrc:x: command not found: shopt错误)