I am working on an HPC with LSF job system.

screen works fine on logon node and most of the computation nodes which I can ssh into them. which command shows that screen is located under /usr/bin. But I found on some node, bash just can not find screen, and mysteriously, I can not find screen under /usr/bin on that node. But I have to use it.

So I think maybe I can install a local version of screen, so I download the screen-4.5.1.tar.gz package. However, ./configure terminated with error

configure: checking for tgetent... configure: checking libcurses... configure: checking libtermcap... configure: checking libtermlib... configure: checking libncursesw... configure: checking libtinfow... configure: checking libncurses... configure: checking libtinfo... configure: error: !!! no tgetent - no screen

Google shows that we need to either sudo apt-get install libncurses-dev or sudo apt-get install ncurses-dev. However, I am not administrator and I have no internet connection on HPC. So I think manually install ncurses should be fine. I downloaded ncurses-6.0.tar.gz. configure, make, make install, finally I got 4 folder in my custom folder myInstall_ncurses: bin, lib, include, shared.

But How should I install screen now? I tried this

./configure --bindir="/home/myInstall_ncurses/bin" --includedir="/home/myInstall_ncurses/include" --libdir="/home/myInstall_ncurses/lib"

But the error is the same. What is wrong?

  • Those configure options determine where screen gets installed. Try ./configure --help and there should be an option that lets you specify where ncurses is
    – Fox
    Commented Feb 28, 2017 at 16:27
  • Hi, @Fox, thank you but If I know which is the option, then I won't need to post this.
    – user15964
    Commented Feb 28, 2017 at 23:31

1 Answer 1


If you have ncurses installed in /home/myInstall_ncurses, and there are lib and include subdirectories of that:

export LDFLAGS='-L/home/myInstall_ncurses/lib'
export CPPFLAGS='-I/home/myInstall_ncurses/include'
./configure --prefix='/where/to/install/screen'
make install
  • Thank you so much. It works! But one more question, I found specifying LDFLAGS only will successfully make. It seems that include is not needed. Is there potential different between adding CPPFLAGS and not adding CPPFLAGS?
    – user15964
    Commented Mar 1, 2017 at 0:27
  • CPPFLAGS here was to specify the include directory, in case that was needed. It may or may not be, depending on what headers were included
    – Fox
    Commented Mar 1, 2017 at 0:39
  • Sorry, one more question. Is using LIBS=-L/home/myInstall_ncurses/lib equivalent to LDFLAGS=-L/home/myInstall_ncurses/lib? any difference?
    – user15964
    Commented Mar 1, 2017 at 2:01
  • They might act the same, but in general they aren't. LDFLAGS is for specifying where things are, while LIBS is more for specifying extra things to link, I believe
    – Fox
    Commented Mar 1, 2017 at 2:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .