tgetent() not found while compiling vim

12,212

Solution 1

I've been using that guy's PPA to keep Vim up-to-date on Ubuntu 11.04. The latest version is 7.3.854 which, I believe, works with YouCompleteMe.

Solution 2

This is because the system lacks the ncurses library, which can be resolved by installing libncurses5-dev.

sudo apt-get install libncurses5-dev

I solved it through this article. enter link description here

Solution 3

I had the exact same issue (recompiling vim to use YCM), and I fixed it by removing src/auto/config.cache (in the vim tree) and re-running ./configure. It seems an outdated configure cache was still there.

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:
12,212

Related videos on Youtube

alxyzc
Author by

alxyzc

Updated on September 18, 2022

Comments

  • alxyzc
    alxyzc over 1 year

    Currently I'm trying to install the YouCompleteMe extension to my vim setup, but it requires my vim to have the version of 7.3.584 or higher. The vim shipped with my Ubuntu 12.10 is 7.3.547, so I had to recompile vim from source following this instrucion.

    As the instruction says, I executed:

    sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \
    libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
    libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial
    

    which should give me all the packages needed for the compilation. However, when I've cloned the vim source and just about to start tweak the configuration for compilation, I got

    ...
    checking for tgetent in -lcurses... yes
    termcap library is not usable
    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.
    

    I did some research, and got the general sense that I should specify ncurses as my terminal library. But when I did

    ./configure --with-tlib=ncurses
    

    it yells back

    ...
    checking --with-tlib argument... ncurses
    chekcing for linking with ncurses library... OK
    chekcing 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.
    

    I don't know if there is anything I've been missing, or if there is another way to get the newest version of vim? Many thanks!

    • Apache
      Apache about 11 years
      The error basically says you need the ncurses dev packages. Which is called "libncurses5-dev - developer's libraries for ncurses".
    • alxyzc
      alxyzc about 11 years
      @Shiki That I did install, per the instruction listed above :/
    • Apache
      Apache about 11 years
      Whoops. Sorry..
  • alxyzc
    alxyzc about 11 years
    Thanks for the advice, but when I did this, Picking 'vim' as source package instead of 'vim-gnome' Looks like it didn't work for me.
  • alxyzc
    alxyzc about 11 years
    Worked like a charm! Now the version's up. Thanks!
  • Apache
    Apache about 11 years
    @alxyzc - This is why you should create a PPA on Launchpad, and copy there your fav packages.
  • alxyzc
    alxyzc about 11 years
    @Shiki Fully noted :)