21

I get the following link error when I'm compiling a small function using ncurses for an Ubuntu 12.04 running on arm. The error is

arm-linux-gnueabihf/bin/ld: cannot find -ltinfo

A lot of hints are floating around on what to install, but I can't seem to find any packages that does the trick for my arm box.

I have done

sudo apt-get install libncurses5-dev

And this does not contain the tinfo library. Other suggestions usually result in the library is "not available but referred by another package" or "has no installation candidate".

All help is appreciated

/Henrik

Henrik
  • 586
  • 1
  • 4
  • 10
  • 1
    Several sources suggest to just create libtinfo as a symlink to libncurses, did you try that already? Eg see https://bbs.archlinux.org/viewtopic.php?id=142384 – fvu Jan 15 '14 at 12:58
  • 3
    for what it's worth, you can try this : sudo apt-get install libtinfo-dev – lucasg Jan 15 '14 at 13:00
  • Could you provide with sample source code and exact compilation string? – vershov Jan 15 '14 at 13:08
  • The symlink worked, thanks! I also tried the libtinfo-dev, which worked nicely, I must have missed that simple one. For all of your answers I thank you! – Henrik Jan 15 '14 at 14:54

2 Answers2

28

As mentioned by lucasg

sudo apt-get install libtinfo-dev 

solved the same problem for me.

Gerbrand
  • 1,561
  • 1
  • 12
  • 20
7

When you cross compile the nurses library, configure this option --with-termlib. It shall install libtinfo into your target location.

Sri Balaji S
  • 71
  • 1
  • 3