日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學(xué)無先后,達(dá)者為師

網(wǎng)站首頁 編程語言 正文

安裝zsh&oh-my-zsh(沒有root權(quán)限)

作者:cxxx17 更新時(shí)間: 2022-04-12 編程語言

安裝zsh&oh-my-zsh(沒有root權(quán)限)

想要安裝智能絲滑的oh-my-zsh,首先check是否安裝了zsh。

zsh --version

若zsh: command not found,則首先需要安裝zsh,否則直接跳至step 2。

step 1 安裝zsh

# 下載最新的zsh安裝包
wget -O zsh.tar.xz https://sourceforge.net/projects/zsh/files/latest/download --no-check-certificate
mkdir zsh && unxz zsh.tar.xz && tar -xvf zsh.tar -C zsh --strip-components 1
cd zsh
# 編譯zsh
./configure --prefix=$HOME/zsh
make && make install
# 安裝完成后。加入環(huán)境變量.bashrc
export PATH=$HOME/zsh/bin:$PATH
# 生效
source ~/.bashrc


# 可能會(huì)報(bào)錯(cuò)This is probably a library called 'curses' or 'ncurses'. 
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
mkdir ncurses
tar -xvf ncurses-6.0.tar.gz
cd ncurses-6.0
./configure --prefix=$HOME/ncurses --with-shared --without-debug --enable-widec
make && make install

# 安裝完成后
export CXXFLAGS="-fPIC"
export CFLAGS="-fPIC"
export NCURSES_HOME=$HOME/ncurses  # 這里表示家目錄的ncurses目錄,可以自己設(shè)置一個(gè)想要的路徑
export PATH=$NCURSES_HOME/bin:$PATH
export LD_LIBRARY_PATH=$NCURSES_HOME/lib:$LD_LIBRARY_PATH
export CPPFLAGS="-I$NCURSES_HOME/include" LDFLAGS="-L$NCURSES_HOME/lib"
加入~/.bashrc

source ~/.bashrc
# 然后編譯zsh即可

step 2 安裝oh-my-zsh

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
source ~/.zshrc

參考:
Linux 非 root 用戶安裝 zsh, 并用 oh-my-zsh 進(jìn)行配置
Install zsh without root access?

原文鏈接:https://blog.csdn.net/weixin_42262721/article/details/123531486

欄目分類
最近更新