5

I just installed the 1.6.7 version and want to upload it a sketch to Arduino UNO hardware. I get error message:

/home/pali/Irataim/TarBalls/Arduino/arduino-1.6.7/hardware/tools/avr/bin/avrdude: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

I'm on Gentoo linux operating system.

How can I solve this problem?

By following this link:

https://forums.gentoo.org/viewtopic-p-7815500.html?sid=f67283068e3655b2f9e259a2097efef6
I just add tinfo USE flag to ncurses package, re-emerged it and can run Arduino IDE that I emerged from Gentoo repository.

Chris Stratton
  • 5,346
  • 17
  • 40
user18811
  • 51
  • 1
  • 1
  • 4
  • (Install dependencies with `emerge -avq sun-jre-bin crossdev`) Run `equery belongs libtinfo.so` , if the library exists then try symlinking the libraries: `ln -s /lib64/libncurses.so.5 /usr/lib/libtinfo.so.5` and `ln -s /usr/lib/libtinfo.so.5 /usr/lib/libtinfo.so`. – Avamander Mar 03 '16 at 21:09
  • I did so, but there is no libtinfo.so library. – user18811 Mar 05 '16 at 09:22
  • `equery belongs libtinfo.so` there is none? – Avamander Mar 05 '16 at 21:39
  • Exactly! There is none libtinfo.so out there. – user18811 Mar 07 '16 at 06:29
  • 1
    @PalCsanyi in the stack exchange system, questions are marked resolved not by editing the title, but by accepting an answer. If none of the provided answers matches your solution, provide your own and accept that, however it does look like at least one of them matches what you said you did. – Chris Stratton Oct 15 '16 at 15:50
  • @sa_leinad please do not edit questions in a way that pushes the most important part of the error message off the screen. Adding a requirement to manipulate a scroll bar to view the actual issue is the opposite of making a question clear. – Chris Stratton Oct 15 '16 at 20:12
  • @ChrisStratton thanks. good point. I'll know that for next time! – sa_leinad Oct 16 '16 at 08:05

2 Answers2

2

Install libtinfo5, the terminfo library.

If that doesn't help, you can try to debug the problem yourself. First, check which libtinfo avrdude is looking for:

ldd arduino-1.7.8-linux64/hardware/tools/avr/bin/avrdude_bin | grep libtinfo

On my Ubuntu, I get this:

libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fa74a888000)

Next, see where your libtinfo is installed:

find /lib /usr/lib -name 'libtinfo*'

On my system I get:

/lib/x86_64-linux-gnu/libtinfo.so.5
/lib/x86_64-linux-gnu/libtinfo.so.5.9

Do you have any discrepancy between the two?

Edgar Bonet
  • 39,449
  • 4
  • 36
  • 72
  • I just installed terminfo package, the Haskell bindings to the terminfo library and try to upload again a sketch. I get the same error message: arduino-1.7.8-linux64/hardware/tools/avr/bin/avrdude: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory. However, I'm using now the just downloaded arduino-1.7.8-linux64 package. – user18811 Mar 02 '16 at 18:36
  • @PalCsanyi: Then I do not have the solution, but I added some hints to help you debug the problem. – Edgar Bonet Mar 02 '16 at 19:03
  • I tried followings on my Gentoo linux: `ldd arduino-1.7.8-linux64/hardware/tools/avr/bin/avrdude` not a dynamic executable `find /lib /usr/lib -name 'libtinfo*'` There is no output. – user18811 Mar 02 '16 at 19:23
  • @PalCsanyi this topic refers to have similar problem and got it solved using a symbolic link to libncurses. Take look: https://forums.gentoo.org/viewtopic-p-7815500.html?sid=f67283068e3655b2f9e259a2097efef6 – brtiberio Mar 02 '16 at 20:15
  • @PalCsanyi: OK, I downloaded arduino.org's tarball (I was testing with Ubuntu's arduino package). Their avrdude is a shell script: the real avrdude is avrdude_bin. I updated the answer with the output I get from their avrdude_bin on a 64-bit system. You said you installed the terminfo package, did you install version 5? What files does it provide that have the ".so" extension? No libtinfo.so.5 in sight? – Edgar Bonet Mar 03 '16 at 09:35
  • My installed terminfo package name is: dev-haskell/terminfo and the installed version is: 0.4.0.0(19.15.39 2016-03-02). Description of this package is: Haskell bindings to the terminfo library. When I run `ldd Irataim/TarBalls/Arduino/arduino-1.7.8-linux64/hardware/tools/avr/bin/avrdude_bin | grep libtinfo` I get: libtinfo.so.5 => not found – user18811 Mar 03 '16 at 19:54
  • No `grep libtinfo`: linux-vdso.so.1 (0x00007ffee67f4000) libusb-1.0.so.0 => /lib64/libusb-1.0.so.0 (0x00007f6fe415e000) libusb-0.1.so.4 => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6fe3f42000) libm.so.6 => /lib64/libm.so.6 (0x00007f6fe3c46000) libreadline.so.6 => /lib64/libreadline.so.6 (0x00007f6fe39fb000) libncurses.so.5 => /lib64/libncurses.so.5 (0x00007f6fe37a4000) libtinfo.so.5 => not found libc.so.6 => /lib64/libc.so.6 (0x00007f6fe3409000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f6fe31e3000) /lib64/ld-linux-x86-64.so.2 (0x00007f6fe4376000) – user18811 Mar 03 '16 at 19:56
  • 1
    @Personagem Indeed, there is a solution for me. Thanks!! https://forums.gentoo.org/viewtopic-p-7815500.html?sid=f67283068e3655b2f9e259a2097efef6 – user18811 Mar 07 '16 at 16:53
  • Thanks, `sudo apt install libtinfo5` worked for me. – Puspam Feb 27 '20 at 19:23
2

You have to rebuild sys-libs/ncurses with tinfo USE flag turned on. (You can also make a symlink: libtinfo.so -> libncurses.so, but it's not elegant solution).

Firstly, check if you have a record for ncurses in any file in /etc/portage/package.use. If not, create a file /etc/portage/package.use/ncurses with such content:

sys-libs/ncurses tinfo

then, rebuild ncurses:

emerge -av sys-libs/ncurses