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 · 11 comments

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

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Sep 22, 2015

Member

Could you try to install lib32-ncurses package?

Member

ivankravets commented Sep 22, 2015

Could you try to install lib32-ncurses package?

@mdaffin

This comment has been minimized.

Show comment
Hide comment
@mdaffin

mdaffin 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)
.

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

This comment has been minimized.

Show comment
Hide comment
@valeros

valeros Sep 22, 2015

Member

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

Member

valeros commented Sep 22, 2015

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

@mdaffin

This comment has been minimized.

Show comment
Hide comment
@mdaffin

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

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

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Sep 23, 2015

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.

Member

ivankravets commented 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 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

This comment has been minimized.

Show comment
Hide comment
@cqql

cqql 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

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

This comment has been minimized.

Show comment
Hide comment
@albfan

albfan Nov 15, 2015

You can use AUR package or solutions commented there

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

albfan commented Nov 15, 2015

You can use AUR package or solutions commented there

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

@milovanderlinden

This comment has been minimized.

Show comment
Hide comment
@milovanderlinden

milovanderlinden Mar 4, 2016

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

milovanderlinden commented Mar 4, 2016

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

@darkwingduck42

This comment has been minimized.

Show comment
Hide comment
@darkwingduck42

darkwingduck42 May 6, 2016

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

darkwingduck42 commented May 6, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@Hamza5

Hamza5 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

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

This comment has been minimized.

Show comment
Hide comment
@jwhendy

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

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