How can I install ncdu on Red Hat/CentOS?
If you are getting below error while installing ncdu using yum command ie, yum install ncdu
No package ncdu available
You will need to download the latest version o ncdu package from http://dev.yorhel.nl/ncdu with wget on the server
wget https://dev.yorhel.nl/download/ncdu-1.15.1.tar.gz
then extract the tarball, with:
tar -xzvf ncdu-1.15.1.tar.gz
this will create a new folder named ncdu-1.15.1. Enter that folder and execute:
./configure --prefix=/usr
If it’s unable to find ncurses.h and the configuration fails,
checking for ncurses.h... no
configure: error: required header file not found
you’ll have to install curses library headers
yum install ncurses-devel ncurses
Once you install the library, you will need to execute the configure step again.
Then run,
make
and
sudo make install
That’s it 🙂
You can optionally remove the ncdu-1.15.1.tar.gz file and the directory where the source files were extracted as you don’t need them anymore.
FYI :- To Install ncdu on Debian/Ubuntu linux, you can use below command
sudo apt-get install ncdu -y
or
sudo aptitude ncdu -y