编译安装 zsh

编译安装 zsh

编译安装 zsh

# yum install wget | apt install wget
wget https://sourceforge.net/projects/zsh/files/zsh/5.9/zsh-5.9.tar.xz
# 官网地址 https://zsh.sourceforge.io/Arc/source.html

# yum install unzip | apt install unzip
tar -xvf zsh-5.9.tar.xz

rm zsh-5.9.tar.xz

cd zsh-5.9

mkdir build && cd build
../configure
make -j80
# 80是你的CPU核心数 可以加快编译
make install

安装 Oh-My-Zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Time to change your default shell to zsh: 否是设置为默认shell
Do you want to change your default shell to zsh? [Y/n] 

安装主题 powerlevel10k

git clone https://github.com/romkatv/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc

常见报错

configure: error: "No terminal handling library was found on your system.
This is probably a library called 'curses' or 'ncurses'.  You may
need to install a package called 'curses-devel' or 'ncurses-devel' on your
system."
See `config.log' for more details
# 解决 安装库
apt-get install libncursesada11-dev

LICENSED UNDER CC BY-NC-SA 4.0
Comment