.zshrc 文件问题

问题描述 投票:0回答:1

我正在尝试在 kali linux 上安装 go 作为 WSL,当我运行此命令时出现错误

* **$source \~/.zshrc** \*

我也尝试用 root 运行它,并得到了与下面相同的错误。

尝试使用 .zshrc 文件解决问题并在我的 kali linux WSL 机器上成功安装 go lang

Command 'setopt' not found, did you mean:    command 'getopt' from deb util-linux    command 'setop' from deb setop   Try: sudo apt install <deb name>   Command 'setopt' not found, did you mean:   command 'getopt' from deb util-linux   command 'setop' from deb setop   Try: sudo apt install <deb name>   Command 'setopt' not found, did you mean:   command 'setop' from deb setop   command 'getopt' from deb util-linux   Try: sudo apt install <deb name>   Command 'setopt' not found, did you mean:   command 'setop' from deb setop  command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'getopt' from deb util-linux command 'setop' from deb setop Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'getopt' from deb util-linux command 'setop' from deb setop Try: sudo apt install <deb name> bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found bindkey: command not found autoload: command not found compinit: command not found Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'astyle' from deb astyle command 'style' from deb diction Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'astyle' from deb astyle command 'style' from deb diction Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'astyle' from deb astyle command 'style' from deb diction Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'zstyle' not found, did you mean: command 'style' from deb diction command 'astyle' from deb astyle Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'setop' from deb setop command 'getopt' from deb util-linux Try: sudo apt install <deb name> Command 'setopt' not found, did you mean: command 'getopt' from deb util-linux command 'setop' from deb setop Try: sudo apt install <deb name> -bash: alias: -L: invalid option alias: usage: alias [-p] [name[=value] ... ] -bash: unalias: -m: invalid option unalias: usage: unalias [-a] name [name ...] -bash: 0=${(%):-%N}: bad substitution -bash: /.version: No such file or directory -bash: /.revision-hash: No such file or directory autoload: command not found is-at-least: command not found -bash: /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh: line 143: syntax error near unexpected token 
永远” -bash:/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh:第143行:
       } always {' -bash: ZSH_HIGHLIGHT_STYLES[bracket-level-2]: bad array subscript Command 'zle' not found, did you mean: command 'ale' from deb ale command 'zile' from deb zile command 'le' from deb le command 'gle' from deb gle-graphics command 'zl' from deb zenlisp command 'mle' from deb mle Try: sudo apt install <deb name> bindkey: command not found -bash: ${(s.:.)LS_COLORS}: bad substitution -bash:  ! ${+ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE} : bad substitution -bash:  ! ${+ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX} : bad substitution -bash:  ! ${+ZSH_AUTOSUGGEST_STRATEGY} : bad substitution -bash:  ! ${+ZSH_AUTOSUGGEST_CLEAR_WIDGETS} : bad substitution -bash:  ! ${+ZSH_AUTOSUGGEST_ACCEPT_WIDGETS} : bad substitution -bash:  ! ${+ZSH_AUTOSUGGEST_EXECUTE_WIDGETS} : bad substitution -bash:  ! ${+ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS} : bad substitution -bash:  ! ${+ZSH_AUTOSUGGEST_IGNORE_WIDGETS} : bad substitution -bash:  ! ${+ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME} : bad substitution -bash: /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh: line 95: syntax error near unexpected token
(' -bash:/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh:第95行:
              user:_zsh_autosuggest_(bound|orig)_*)' -bash:  ! ${+functions[command_not_found_handler]} : bad substitution

windows-subsystem-for-linux zshrc kali-linux
1个回答
0
投票

您似乎正在 bash shell 上运行

source ~/.zshrc
setopt, bindkey, zstyle
此类命令特定于 Zsh,在 Bash 中不存在。

检查您所在的 shell:

echo $SHELL

# install zshell
sudo apt update
sudo apt upgrade
sudo apt install zsh

# start zshell
zsh

瞧!然后你就可以做你的

source ~/.zshrc

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.