zoukankan      html  css  js  c++  java
  • 解决升级系统为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又好用了。

  • 相关阅读:
    Trie树详解及其应用
    最长回文字符串_Manacher算法_(O(n))
    设置VisualStudio以管理员身份运行
    wcf使用JetEntityFrameworkProvider.dll写access数据库时,报"操作必须使用一个可更新的查询"错误的解决办法
    data:image字符转byte[]
    ID为XXXX的进程当前未运行
    在Windows2003 server 64位系统上使用ArcEngine开发的WCF服务
    关于position的relative和absolute分别是相对于谁进行定位的
    sql语句进行写数据库时,字符串含有'的处理方式
    EF中关于日期字值的处理
  • 原文地址:https://www.cnblogs.com/flyingskya/p/14303518.html
Copyright © 2011-2022 走看看