Learn how to get rid of the fatal error: curses.h: No such file or directory during utility or third-party package installations in Linux.
Many times during package/utility installations you must have come across an error like one below :
fatal error: curses.h: No such file or directory
Recently I faced it while installing cmatrix from source code. I saw an error like one below :
# make gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -Wall -Wno-comment -c cmatrix.c cmatrix.c:37:20: fatal error: curses.h: No such file or directory #include <curses.h> ^ compilation terminated. make: *** [cmatrix.o] Error 1
After troubleshooting I came up with a solution and able to pass through
make stage. I am sharing it here which might be useful for you.
curses.h header file belongs to
ncurses module! You need to install packages
ncurses (YUM) or
libncurses5-dev (APT) and you will be through this error.
yum install ncurses-devel ncurses for YUM based systems (like Red Hat, CentOS, etc.) or
apt-get install libncurses5-dev for APT based systems (like Debian, Ubuntu, etc.) Verify once that package is installed and proceed with your next course of action.
Follow category ‘Troubleshooting errors‘ for more such error based solutions.
John Ahearn says
nope. didn’t work. sounded like you knew what you were talking about tho!
It worked perfectly! Thank you so much!