Archlinux: cannot open shared object file #291

mdaffin opened this Issue Sep 21, 2015 · 11 comments


None yet

9 participants

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: 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

Could you try to install lib32-ncurses package?

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 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 commented Sep 22, 2015

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

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"

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

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

The idea with symbolic link is normal temporary solution.

cqql commented Oct 18, 2015

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

ln -s /usr/bin/avrdude $AVRDUDE
albfan commented Nov 15, 2015

You can use AUR package or solutions commented there


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


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