I am also having the same issue. I installed libncurses by giving this command
sudo apt-get install libncurses5-dev libncursesw5-dev
and this is the output of above command
Output of above command
ammar@ammar-HP-15-Notebook-PC:~$ sudo apt-get install libncurses5-dev libncursesw5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libncurses5-dev is already the newest version.
libncursesw5-dev is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic
linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic
linux-signed-image-4.2.0-16-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
----------
but when i again changed the directory to samtools and given the command for configuring the same issue was there.
----------
## Output of ./configure ##
ammar@ammar-HP-15-Notebook-PC:~$ cd samtools-1.3.1
ammar@ammar-HP-15-Notebook-PC:~/samtools-1.3.1$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking location of HTSlib source tree... htslib-1.3.1
./configure: line 3086: AX_WITH_CURSES: command not found
configure: error: curses development files not found
The 'samtools tview' command uses the curses text user interface library. Building samtools with tview requires curses/ncurses/etc development files to be installed on the build machine; you may need to ensure a package such as libncurses5-dev (on Debian or Ubuntu Linux) or ncurses-devel (on RPM-based Linux distributions) is installed.
FAILED. Either configure --without-curses or resolve this error to build samtools successfully.
----------
----------
Anyone who knows please help.
Here are the steps I followed to fix it. Hope this is helpful to others