Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archlinux: libncurses.so.5: cannot open shared object file #291

Closed
mdaffin opened this issue Sep 21, 2015 · 14 comments
Closed

Archlinux: libncurses.so.5: cannot open shared object file #291

mdaffin opened this issue Sep 21, 2015 · 14 comments
Assignees
Labels

Comments

@mdaffin
Copy link

mdaffin commented Sep 21, 2015

Archlinux is now using ncurses6 which is causing the following error in platformio while trying to upload to the arduino platform:

avrdude: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

The archlinux version of avrdude works with the quick workaround:

rm ~/.platformio/packages/tool-avrdude/avrdude
ln -s /usr/bin/avrdude ~/.platformio/packages/tool-avrdude/avrdude

However, the tools that platformio downloads should come with the dependencies that they require to run or alternatively make use of the system tools when they are available.

@ivankravets
Copy link
Member

Could you try to install lib32-ncurses package?

@mdaffin
Copy link
Author

mdaffin commented Sep 22, 2015

No difference, it is version 6, when then downloaded version is looking for
version 5.

On Tue, 22 Sep 2015 08:39 Ivan Kravets [email protected] wrote:

Could you try to install lib32-ncurses package?


Reply to this email directly or view it on GitHub
#291 (comment)
.

@ivankravets ivankravets assigned valeros and unassigned ivankravets Sep 22, 2015
@valeros
Copy link
Member

valeros commented Sep 22, 2015

Hi @James147
Do you have the same issue when you upload sketch through Arduino IDE?

@mdaffin
Copy link
Author

mdaffin commented Sep 22, 2015

Not with the one in the Arch User Repo, but it appears to replace the arduino provided avrdude with the working system one:

  # fix avrdude
  rm -f "${pkgdir}/usr/share/arduino/hardware/tools/avr/bin/avrdude"{,_bin}
  ln -s /usr/bin/avrdude "${pkgdir}/usr/share/arduino/hardware/tools/avr/bin/avrdude"

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=arduino

So I assume that the official arduino build of avrdude does have the same problem.

@ivankravets
Copy link
Member

@James147 I've just added to FAQ page info about the solution for this issue. If we recompile avrdude with the latest libncurses.so.6, it will not work with the rest Linux distributives (Debian, Ubuntu, etc.).

The idea with symbolic link is normal temporary solution.

@martenlienen
Copy link

I had to replace the avrdude installed by platformio with the system one, so

AVRDUDE=~/.platformio/packages/tool-avrdude/avrdude
rm $AVRDUDE
ln -s /usr/bin/avrdude $AVRDUDE

@albfan
Copy link

albfan commented Nov 15, 2015

You can use AUR package or solutions commented there

https://aur.archlinux.org/packages/arduino/

@milovanderlinden
Copy link

Thanks @cqql your solution works like a charm for me.

@darkwingduck42
Copy link

@ivankravets Thats the reason why linux distributions have a package manager. Either you ship the binary AND its dependencies or you let package manager do its work. Everything between is just a mess. So the obvious solution would be not to ship binaries at all!

@Hamza5
Copy link

Hamza5 commented Oct 3, 2016

In addition to what @mdaffin posted in the first comment, I had to link the avrdude of the toolchain-atmelavr to the new avrdude also, so I had to add these commands :

rm ~/.platformio/packages/toolchain-atmelavr/bin/avrdude
ln -s ~/.platformio/packages/tool-avrdude/avrdude ~/.platformio/packages/toolchain-atmelavr/bin/avrdude

@jwhendy
Copy link

jwhendy commented Nov 2, 2016

Confirming that @Hamza5 's addition did it for me. I ended up symlinking both locations, but it only worked upon the second (in toolchain-atmelavr as well as tool-avrdude.

@orzel
Copy link

orzel commented Dec 29, 2019

I'm trying platformio on gentoo. Most 'packages' are broken in the same way:

piogdb: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

or

% ldd .platformio//packages/toolchain-gd32v/bin/riscv-nuclei-elf-gdb
linux-vdso.so.1 (0x00007ffe46d73000)
libncursesw.so.5 => not found
libtinfo.so.5 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00007f67db6b4000)
libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f67db676000)
libmpfr.so.6 => /usr/lib64/libmpfr.so.6 (0x00007f67db5f6000)
libm.so.6 => /lib64/libm.so.6 (0x00007f67db4b5000)
libc.so.6 => /lib64/libc.so.6 (0x00007f67db2dc000)
/lib64/ld-linux-x86-64.so.2 (0x00007f67dbfb0000)
libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f67db261000)

@thoastbrot
Copy link

So that issue is part of the PIO FAQ... I can't really see a proper solution here. The AUR package is gone, the symlinks look like crude hacks...

@waohwoah
Copy link

By downloading the ncurses5-compat-libs & lib32-ncurses5-compat-libs from AUR, this issue was solved for me.
Should work on other distros by downloading these same packages from their specific package managers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests