The minimum required version for Powerlevel10k is 5.1

一、背景

安装 ZSH 主题 Powerlevel10k 时报错:

You are using ZSH version 5.0.2. The minimum required version for Powerlevel10k is 5.1.
Type 'echo $ZSH_VERSION' to see your current zsh version.

二、原因

通过 yum install -y zsh 默认安装的是 ZSH 5.0.2 版本但是安装 Powerlevel10k 需要的最低 ZSH 版本为 5.1。

故需要对 ZSH 进行版本升级

三、解决

1、安装 ZSH 最新版本

sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"

没有 curl 可以使用如下命令

sh -c "$(wget -O- https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"

2、效果

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
Choose installation directory for Zsh 5.8:

  (1) /usr/local        <= uses sudo (recommended)
  (2) ~/.local          <= does not need sudo
  (3) custom directory  <= manual input required

Choice: 1

===> installing Zsh 5.8 to /usr/local
===> fetching zsh-5.8-linux-x86_64.tar.gz
===> verifying archive integrity
===> sha256 signature matches
===> md5 signature matches
===> extracting files

Installed Zsh 5.8 to /usr/local

To start Zsh, type:

  zsh

image-20240919235830817

再次修改 oh-my-zsh theme 为 Powerlevel10k 即可

image-20240920000213239

3、下载了还是显示 ZSH 版本为 5.0.2 怎么办

image-20240920000533994

我这边的做法是启动一个新的 bash 实例也就是先输入 bash 随后再切回 zsh 实例(输入zsh),一般这个时候再输入
zsh --version 会看到版本已经更新为最新版本了
posted @ 2024-09-20 00:18  misakivv  阅读(61)  评论(0编辑  收藏  举报