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

Closed
mdaffin opened this Issue Sep 21, 2015 · 11 comments

Projects

None yet

9 participants

@mdaffin
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 ivankravets self-assigned this Sep 22, 2015
@ivankravets
Member

Could you try to install lib32-ncurses package?

@mdaffin
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 notifications@github.com 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
Member
valeros commented Sep 22, 2015

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

@mdaffin
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 ivankravets added wontfix and removed help wanted labels Sep 23, 2015
@ivankravets
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.

@cqql
cqql commented Oct 18, 2015

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
albfan commented Nov 15, 2015

You can use AUR package or solutions commented there

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

@milovanderlinden

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

@darkwingduck42

@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
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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment