• 解决升级系统为MacOS Big Sur后zsh报错的问题


    macOS Big Sur后zsh报错:

    /etc/zshrc:29: failed to load module `zsh/terminfo': dlopen(/usr/lib/zsh/5.3/zsh/terminfo.so, 9): image 
    (anon):7: failed to load module `zsh/stat': dlopen(/usr/lib/zsh/5.3/zsh/stat.so, 9): image not found
    current_epoch:1: failed to load module `zsh/datetime': dlopen(/usr/lib/zsh/5.3/zsh/datetime.so, 9): image not found
    /Users/king/.oh-my-zsh/oh-my-zsh.sh:78: compinit: function definition file not found
    /Users/king/.oh-my-zsh/lib/cli.zsh:59: command not found: compdef
    detect-clipboard:3: failed to load module `zsh/parameter': dlopen(/usr/lib/zsh/5.3/zsh/parameter.so, 9): image not found
    /Users/king/.oh-my-zsh/lib/completion.zsh:2: failed to load module `zsh/zle': dlopen(/usr/lib/zsh/5.3/zsh/zle.so, 9): image not found
    /Users/king/.oh-my-zsh/lib/completion.zsh:13: failed to load module `zsh/zle': dlopen(/usr/lib/zsh/5.3/zsh/zle.so, 9): image not found
    /Users/king/.oh-my-zsh/lib/completion.zsh:23: command not found: zstyle
    /Users/king/.oh-my-zsh/lib/completion.zsh:75: bashcompinit: function definition file not found
    /Users/king/.oh-my-zsh/lib/directories.zsh:32: command not found: compdef
    /Users/king/.oh-my-zsh/lib/functions.zsh:100: failed to load module `zsh/langinfo': dlopen(/usr/lib/zsh/5.3/zsh/langinfo.so, 9): image not found
    /Users/king/.oh-my-zsh/lib/key-bindings.zsh:19: command not found: bindkey
    /Users/king/.oh-my-zsh/lib/key-bindings.zsh:78: failed to load module `zsh/terminfo': dlopen(/usr/lib/zsh/5.3/zsh/terminfo.so, 9): image not found
    /Users/king/.oh-my-zsh/lib/key-bindings.zsh:83: command not found: bindkey
    /Users/king/.oh-my-zsh/lib/key-bindings.zsh:115: failed to load module `zsh/zle': dlopen(/usr/lib/zsh/5.3/zsh/zle.so, 9): image not found
    /Users/king/.oh-my-zsh/lib/key-bindings.zsh:116: command not found: bindkey
    env_default:1: failed to load module `zsh/parameter': dlopen(/usr/lib/zsh/5.3/zsh/parameter.so, 9): image not found
    /Users/king/.oh-my-zsh/lib/misc.zsh:28: failed to load module `zsh/parameter': dlopen(/usr/lib/zsh/5.3/zsh/parameter.so, 9): image not found
    /Users/king/.oh-my-zsh/lib/termsupport.zsh:109: add-zsh-hook: function definition file not found
    /Users/king/.oh-my-zsh/plugins/git/git.plugin.zsh:112: command not found: compdef
    /Users/king/.oh-my-zsh/plugins/git/git.plugin.zsh:116: is-at-least: function definition file not found
    /Users/king/.oh-my-zsh/plugins/git/git.plugin.zsh:130: command not found: compdef
    /Users/king/.oh-my-zsh/plugins/git/git.plugin.zsh:255: is-at-least: function definition file not found
    zsh: failed to load module `zsh/zle': dlopen(/usr/lib/zsh/5.3/zsh/zle.so, 9): image not found

    解决方法:

    # List of acceptable shells for chpass(1).
    # Ftpd will not allow users to connect who are not using
    # one of these shells.
    
    /bin/bash
    /bin/csh
    /bin/ksh
    /bin/sh
    /bin/tcsh
    
      /bin/zsh #zsh只保留这一项
      /usr/local/Cellar/zsh/5.8/bin/zsh-5.8 #brew安装的话,zsh只保留这一项
     
      #  删除 /usr/local/bin/zsh  这一项 
    ~                                                                               
    ~                                                                               
    ~                                                                               
    ~                                                                               
    :wq

    切换bash为zsh

    chsh -s /bin/zsh

    chsh -s /usr/local/Cellar/zsh/5.8/bin/zsh-5.8

    zsh又好用了。

  • 相关阅读:
    P2168 [NOI2015]荷马史诗
    P3195 [HNOI2008]玩具装箱TOY
    P1972 [SDOI2009]HH的项链
    P2339 提交作业usaco
    P3974 [TJOI2015]组合数学
    P2831 愤怒的小鸟
    [校内模拟题4]
    P3952 时间复杂度
    P3531 [POI2012]LIT-Letters
    2019.10.1 qbxt模拟题
  • 原文地址:https://www.cnblogs.com/flyingskya/p/14303518.html
Copyright © 2020-2023  润新知