I am trying to install Zsh without root privileges on a Linux machine. I downloaded the source tarball and run:

./configure --prefix=<my_installation_path>

but then I got:

configure: error: "No terminal handling library was found on your system. This is probably a library called curses or ncurses. You may need to install a package called 'curses-devel' or 'ncurses-devel' on your system"

Installing ncurses:

Since I am not root on this system, I downloaded ncurses and installed it manually (also using ./configure --prefix=<my_installation_path>), which seems to have gone well.

I then updated the following paths:


and tried installing Zsh again, but got the same ncurses error. As far as I can tell, the path variables above point to the right locations, and I can check this on the shell. Why is Zsh not recognizing ncurses?

  • Can't you get an admin to install these things on your machine? These packages would be available for any distribution. Commented Apr 7, 2014 at 19:35
  • @FaheemMitha I don't have admin privileges - The goal is to install it without them. Commented Apr 7, 2014 at 19:40
  • I know you don't, but isn't there someone who does? You could certainly install with one, but you're just going to create a mess, especially if there are a lot of packages you are trying to install that way. Commented Apr 7, 2014 at 19:42

2 Answers 2


I see at least one thing missing: you're passing CFLAGS=-I/path/to/installation/include, which lets the compilation scripts find the header files, but you also need to let the compilation scripts find the library to link against (libncurses.a). Also the installation instructions say to use CPPFLAGS for the include directories, not CFLAGS.


Be sure to read the complete error messages from ./configure, and check the logs in config.log which contain more information (there's a detailed transcript of the commands that configure ran and their output).

  • Thank you @Gilles. That fixed the problem that I reported. However I now get <INSTALLATION_PATH>/lib/libncurses.a: could not read symbols: Bad value during make. Not sure why. I am using the latest stable releases of both, and did not see any problems during the installation of ncourses. Commented Apr 7, 2014 at 23:03
  • I also get a recompile with -fPIC. I wonder if this is why I get the error that I get. Commented Apr 7, 2014 at 23:07


Following Gilles' answer, I updated CPPFLAGS and LDFLAGS and the problem goes away during configure.

However, I now get an error during make:

<INSTALLATION_PATH>/lib/libncurses.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

I also get a recompile with -fPIC. I guess this refers to the compilation of ncurses. I presume this means that I built ncurses as static, and I should built it as dynamic? How would I do that?

Update 2:

I re-compiled ncurses again. This time, I did:

  • export CXXFLAGS=" -fPIC"
  • export CFLAGS=" -fPIC"

prior to make, and then added --enable-shared to ./configure for both ncurses and Zsh. This seems to have fixed the problem!

  • I also met with this issue. The solution here works for me.
    – jdhao
    Commented Oct 25, 2018 at 10:55
  • Using "--with-shared" worked for me. See ./configure --help will tell you what is correct.
    – Akash
    Commented May 9, 2020 at 16:13

You must log in to answer this question.

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