Oh-my-zsh 安装Powerlevel10k主题出错,发现Centos7 yum 安装的zsh是5.02版的。 并且yum update无法升级到更高的版本,看来只能编译安装了。

首先卸载zsh

yum remove zsh

然后编译吧

sudo yum update -y
sudo yum install -y git make ncurses-devel gcc autoconf man
git clone -b zsh-5.7.1 https://github.com/zsh-users/zsh.git /tmp/zsh
cd /tmp/zsh
./Util/preconfig
./configure
sudo make -j 20 install.bin install.modules install.fns

设置成默认shell

command -v zsh | sudo tee -a /etc/shells
sudo chsh -s /usr/local/bin/zsh