Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 662
  • Last Modified:

can't install ncurses


A piece of software i want to use says it needs ncurses development libraries. I don't know much about this apart from the fact they are c++ libraries and I don't have anything for c++ installed on my machine. I tried installing ncurses via the instructions here


and got this error

cd ../objects;   -I../c++ -I../include -I. -DHAVE_CONFIG_H -I. -I../include  -D_GNU_SOURCE -DNDEBUG -I/opt/ncurses/include/ncurses  -c ../c++/cursesf.cc
/bin/sh: -I../c++: not found
make[1]: *** [../objects/cursesf.o] Error 127
make[1]: Leaving directory `/home/andrea/Downloads/ncurses-5.7/c++'
make: *** [all] Error 2

Please could you advise me?
  • 5
  • 3
  • 2
5 Solutions
Hello andieje,

from your posting i guess you are using Debian or Ubuntu... i am asking myself why don't install Ncurses from the package repository available for Debian / Ubuntu?

you could just type "apt-get install libncurses5-dev"  - don't forget to be root...

Here is how it looks like for me on Debian Squeeze; I used the -s (simulate) option to just simulate the installation since i did not want to install Ncurses in real...

root@vm0-debian-squeeze:/# apt-get -s install libncurses5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  binutils cpp cpp-4.4 gcc gcc-4.4 gcc-4.4-base libc-dev-bin libc6-dev libgcc1 libgomp1 libmpfr4 libncurses5 libstdc++6 linux-libc-dev manpages-dev ncurses-bin
Suggested packages:
  binutils-doc cpp-doc gcc-4.4-locales gcc-multilib make autoconf automake1.9 libtool flex bison gdb gcc-doc gcc-4.4-multilib libmudflap0-4.4-dev gcc-4.4-doc
  libgcc1-dbg libgomp1-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7 glibc-doc
The following NEW packages will be installed:
  binutils gcc gcc-4.4 libc-dev-bin libc6-dev libgomp1 libmpfr4 libncurses5-dev linux-libc-dev manpages-dev
The following packages will be upgraded:
  cpp cpp-4.4 gcc-4.4-base libgcc1 libncurses5 libstdc++6 ncurses-bin
7 upgraded, 10 newly installed, 0 to remove and 147 not upgraded.
Inst ncurses-bin [5.7+20100313-2] (5.7+20100313-5 Debian:6.0.1/stable)
Conf ncurses-bin (5.7+20100313-5 Debian:6.0.1/stable)
Inst gcc-4.4-base [4.4.4-1] (4.4.5-8 Debian:6.0.1/stable) [libstdc++6 libgcc1 cpp-4.4 ]
Conf gcc-4.4-base (4.4.5-8 Debian:6.0.1/stable) [libstdc++6 libgcc1 cpp-4.4 ]
Inst libstdc++6 [4.4.4-1] (4.4.5-8 Debian:6.0.1/stable) [libgcc1 cpp-4.4 ]
Conf libstdc++6 (4.4.5-8 Debian:6.0.1/stable) [libgcc1 cpp-4.4 ]
Inst libmpfr4 (3.0.0-2 Debian:6.0.1/stable) [libgcc1 cpp-4.4 ]
Inst cpp-4.4 [4.4.4-1] (4.4.5-8 Debian:6.0.1/stable) [libgcc1 ]
Inst libgcc1 [1:4.4.4-1] (1:4.4.5-8 Debian:6.0.1/stable)
Conf libgcc1 (1:4.4.5-8 Debian:6.0.1/stable)
Inst libncurses5 [5.7+20100313-2] (5.7+20100313-5 Debian:6.0.1/stable)
Conf libncurses5 (5.7+20100313-5 Debian:6.0.1/stable)
Inst binutils (2.20.1-16 Debian:6.0.1/stable)
Inst cpp [4:4.4.3-1] (4:4.4.5-1 Debian:6.0.1/stable)
Inst libgomp1 (4.4.5-8 Debian:6.0.1/stable)
Inst gcc-4.4 (4.4.5-8 Debian:6.0.1/stable)
Inst gcc (4:4.4.5-1 Debian:6.0.1/stable)
Inst libc-dev-bin (2.11.2-10 Debian:6.0.1/stable)
Inst linux-libc-dev (2.6.32-31 Debian:6.0.1/stable)
Inst libc6-dev (2.11.2-10 Debian:6.0.1/stable)
Inst libncurses5-dev (5.7+20100313-5 Debian:6.0.1/stable)
Inst manpages-dev (3.27-1 Debian:6.0.1/stable)
Conf libmpfr4 (3.0.0-2 Debian:6.0.1/stable)
Conf cpp-4.4 (4.4.5-8 Debian:6.0.1/stable)
Conf binutils (2.20.1-16 Debian:6.0.1/stable)
Conf cpp (4:4.4.5-1 Debian:6.0.1/stable)
Conf libgomp1 (4.4.5-8 Debian:6.0.1/stable)
Conf gcc-4.4 (4.4.5-8 Debian:6.0.1/stable)
Conf gcc (4:4.4.5-1 Debian:6.0.1/stable)
Conf libc-dev-bin (2.11.2-10 Debian:6.0.1/stable)
Conf linux-libc-dev (2.6.32-31 Debian:6.0.1/stable)
Conf libc6-dev (2.11.2-10 Debian:6.0.1/stable)
Conf libncurses5-dev (5.7+20100313-5 Debian:6.0.1/stable)
Conf manpages-dev (3.27-1 Debian:6.0.1/stable)

Open in new window

andiejeAuthor Commented:

I just did that. How do you know libncurses5-dev is the corresponding file? IS there a naming convention

The instructions i followed told me to do this:

sudo apt-get libncurses5-dev
make clean

What is the difference between make clean and just make? I don't understand why i was told to issue 2 make commands (i don't know much about make)
Hello Andieje,

I used the command  "apt-cache search ncurses | grep ncurses" to search for the package in the repository. There i discovered the the "libncurses5-dev" package. The "-dev" stands for development...

You just need the command "make" when you compile packages from source code. In the repository there are binary already compiled packages ready to use for you system.

If you compile from source code you go like:

./configure (It examines your system to verify the existence of a compiler, libraries, utilities and other items necessary for a successful compile. It uses the information it finds to produce a custom Makefile for the software package)
make (compiles actually the source code)
make install (installs the compiled package)

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Here is a good link that explains how to use "apt".


compiling from source is not needed that often since you have to keep track of dependencies and versions.... And there are thousands of packages you can install directly from the repository.
andiejeAuthor Commented:
thanks for that. Very helpful. However you didn't specify the difference between make and make clean
andiejeAuthor Commented:
also, do i need to do anything to clean up after my failed 'makes' or does make take care of that itself
"make clean" cleans the source code from unneeded object files, libraries or files form previous compile. In other words there remains only files needed for compilation...
"make" compiles the source code
also, do i need to do anything to clean up after my failed 'makes' or does make take care of that itself

No you don't need to "make clean" after a compilation failure. Make takes care of it and starts to compile where it stopped before. This is accomplished by the help of timestamps of files as far as i know...
Kerem ERSOYPresidentCommented:
BTW apt-get will retrieve and setup a binary package. This is a source package , configured and and compiled ( using make) and then packaged into debian package.

So there are two questions here:
- If you are going with apt-get you wont need to compile your program yourself. If you install any fileset ending with -dev the apt-get will install prerequisite the C++ headers automatically.
- If you'll compile your own package the steps would be:
  - untar the package
  - run the cofigure package ( ./configure --without-cxx-binding )  this is what readme suggests for
     /bin/sh: -I../c++: not found
    type of errors.
   - issue make

I guess you've omitted the ./configure step or didi not see the readme suggesting --without-cxx-binding switch.

Kerem ERSOYPresidentCommented:
The excerpt from the README

6.  The c++ directory has C++ classes that are built on top of ncurses and
    panels.  You must have c++ (and its libraries) installed before you can
    compile and run the demo.

   Use --without-cxx-binding to tell configure to not build the C++ bindings
    and demo.

    If you do not have C++, you must use the --without-cxx option to tell
    the configure script to not attempt to determine the type of 'bool'
    which may be supported by C++.  IF YOU USE THIS OPTION, BE ADVISED THAT


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now