Build zsh without Root access

Published: by Creative Commons Licence

Time to read: Less than 1 minute

How you can use zsh as your shell even if you do not have root access on your computer.

zsh needs the library ncurses for build time. Download the latest versions of the source tgz of zsh and ncurses. In the following example, I have used the versions ncurses-5.9.tgz  and zsh-5.0.6.tgz.

Assumption: I want to install zsh to ~/opt/zsh-5.0.6.

First build ncurses and put it into ~/opt/ncurses-5.9:

$ tar xvzf ncurses-5.9.tgz
$ cd ncurses-5.9
configure --prefix=$HOME/opt/ncurses-5.9
make
$ make install

Then build zsh and put it into ~/opt/zsh-5.0.6:

$ tar xvzf zsh-5.0.6.tgz
$ cd zsh-5.0.6
$ CPPFLAGS="-I$HOME/opt/ncurses-5.9/include" LDFLAGS="-L$HOME/opt/ncurses-5.9/lib"
$./configure --prefix=$HOME/opt/zsh-5.0.6
make
$ make install