No Terminal Library Found when Compiling Vim

54,120

Solution 1

I think you should install a ncurses-dev library.

you can do so by running sudo apt-get install libncurses5-dev libncursesw5-dev

Solution 2

Run sudo apt-get build-dep vim to install all the packages that was used to build the vim package from the repositories.

Solution 3

if you don't have sudo access, the solution is as follows:

download the latest (or whichever) release of ncurses from http://ftp.gnu.org/pub/gnu/ncurses/

run these bash commands:

mkdir ~/usr/local
cd <path_to_ncurses>
tar xzvf <ncurses>.tar.gz # change the tar command if it is not a tar.gz
cd <ncurses>
./configure --prefix=$HOME/usr/local
make
make install
cd <path_to_vim>
LDFLAGS=-L$HOME/usr/local/lib ./configure # then add any options e.g. --prefix=$HOME/usr/local
make
make install

And there you go. It's not often that people don't have sudo access to a machine, but this was my case, and this thread didn't provide the information I needed :) Now it does

Solution 4

I'm running ubuntu 16.10 and couldn't get vim 8.0 to compile. Googling the issue told me to install a package ncurses-dev but I couldn't find that package. I finally found that installing package libtinfo-dev did the trick and I was able to compile vim.

Share:
54,120

Related videos on Youtube

Fawkes5
Author by

Fawkes5

Updated on September 18, 2022

Comments

  • Fawkes5
    Fawkes5 over 1 year

    I am running Ubuntu 12.04.

    I'm trying to a get a particular plugin for vim working and it requires that vim has ruby support enabled (the plugin is command-t).

    People tell me that I must go into my vim directory and run

    ./configure --enable-rubyinterp
    

    When i do this i get the following error:

        no terminal library found
    checking for tgetent()... configure: error: NOT FOUND!
          You need to install a terminal library; for example ncurses.
          Or specify the name of the library with --with-tlib.
    

    Now I’ve checked and ncurses-base is installed.

    What do I need to do?

    • epsilonhalbe
      epsilonhalbe almost 12 years
      I think you should install a ncurses-dev library
    • epsilonhalbe
      epsilonhalbe almost 12 years
      could you provide the contents of src/auto/config.log
    • Fawkes5
      Fawkes5 almost 12 years
      thank you epsilon, that solved it. Could you make that into answer so i can give you credit
  • Penghe Geng
    Penghe Geng almost 8 years
    In my case, the above step is still not good enough. I need to add $HOME/usr/local/lib to LD_LIBRARY_PATH as well.
  • rookiepig
    rookiepig over 7 years
    + 1 for the build-dep command
  • Marnix A.  van Ammers
    Marnix A. van Ammers over 7 years
    I'm running ubuntu 16.10 and couldn't find a package "ncurses-dev" . I finally found that installing libtinfo-dev did the trick.
  • Gary
    Gary about 7 years
    on ubuntu 16.04: sudo apt-get install ncurses-dev
  • Anwar
    Anwar almost 7 years
    Does it add anything to the accepted answer?
  • Ashish Karpe
    Ashish Karpe over 6 years
    # 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 (6.0+20160213-1ubuntu1). libncursesw5-dev is already the newest version (6.0+20160213-1ubuntu1). 0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded. ............................still getting err : /usr/bin/ld: help.o: undefined reference to symbol 'delwin@@NCURSES_5.0.19991023'
  • Ashish Karpe
    Ashish Karpe over 6 years
    //usr/local/lib/libncurses.so.5: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:18: recipe for target 'omnitty' failed make: *** [omnitty] Error 1
  • NerdOfCode
    NerdOfCode over 4 years
    Latest apt repositories select libncurses5-dev over ncurses-dev
  • Philippe Paré
    Philippe Paré about 3 years
    on CentOS: sudo yum install ncurses-devel If fixed this checking for working terminal libraries... Cannot find terminal libraries - configure failed