美文网首页
Ubuntu 18.04解决执行source ~/.bashrc

Ubuntu 18.04解决执行source ~/.bashrc

作者: weizujie | 来源:发表于2018-10-16 19:28 被阅读167次

    刚刚在配置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

          本文链接:https://www.haomeiwen.com/subject/fofkzftx.html