arm-none-eabi-gdb on 64b debian(mint) - cannot open shared object file

Asked by John Morrison on 2013-04-14

after getting 32 bit support for 64bit debian(mint)

vbmint ~ $ sudo apt-get install ia32-libs

and got openocd to work, tried to get gdb working, and after adding the appropriate PATH

vbmint ~ $ arm-none-eabi-gdb
arm-none-eabi-gdb: error while loading shared libraries: cannot open shared object file: No such file or directory

I made sure the libncurses5 existed, and it claims to have multi-arch support.
After a variety of wasted life missteps, that are useless to report, it appears that, that libncurses5 installs is a working i386 lib, so the following fix works

vbmint ~ $ cd /lib/i386-linux-gnu
vbmint /lib/i386-linux-gnu $ sudo ln -sf

then -

vbmint ~ $ arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:

It may be useful to someone that libncurses5 installs a symlink for which points to in /lib/x86_64-linux-gnu, adding this location to LD_LIBRARY_PATH generates the following

vbmint ~ $ arm-none-eabi-gdb
arm-none-eabi-gdb: error while loading shared libraries: wrong ELF class: ELFCLASS64

Thought I would share, hopefully save someone some time. SOLVED(ish)!

Question information

German (Germany) Edit question
GNU Arm Embedded Toolchain Edit question
No assignee Edit question
Solved by:
Joey Ye
Last query:
Last reply:
Best Joey Ye (jinyun-ye) said : #1


Thanks for sharing. We didn't encounter this problem on 64 bit Ubuntu, where the package was validated.

- Joey

John Morrison (draxcascone) said : #2

Thanks Joey Ye, that solved my question.

Similarly, on Ubuntu 13.10:

sudo apt-get install lib32ncurses5

This was all that was needed to get gdb running in the eclipse-nios2 environment as supplied by Altera, for live debugging of a soft-core Nios processor on an FPGA