Friday, September 7, 2012

Error: /usr/bin/ld: cannot find -lncurses

I was working with genometools with HMMER enabled. While compiling, I got the following error message:

$ make with-hmmer=yes threads=yes cairo=no
[check for HMMER3]
[build HMMER3]
[compile pdom.o]
[link libgenometools.a]
[link libgenometools.so]
[link skproto]
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [bin/skproto] Error 1

I checked that libncurses5 was already installed and updated. Anyway, I did
sudo apt-get install libncurses5-dev

again, but the error message was still there. Then I found a post (#23) on https://groups.google.com/group/android-building/tree/browse_frm/month/2010-10/6579583604439ab9?rnum=21&_done=/group/android-building/browse_frm/month/2010-10?&pli=1 and followed the suggestion and did 

sudo apt-get install lib32ncurses5-dev 

Now the error message is gone.