Ubuntu 20.04.1 LTS 64-bit 3.36.3 Gnome Intel core-i7-975H 31.2GiB Memory 1.6 TB Disk Space Had my flu vaccine COVID-19: Neg, but I'm boring and don't go anywhere anyway...

I've tried a few fixes, including this one:

Message "Unable to run arm-none-eabi-gdb: cannot find libncurses.so.5"

But no love. I still continue to receive the same error. I'm trying to flash a softdevice using Arduino IDE v1.8.13. GDB version here:

arm-none-eabi-gdb --version

libncurses versions here:

dpkg -l 'ncurses' | grep '^ii'

I do not know what else to try or check. Would someone have any thoughts on what further to check?

@MarkPlotnick - I ran ls -ld $(dpkg -S libncurses.so.5), the result:

ls -ld $(dpkg -S libncurses.so.5)

Then I checked specifically if libncurses5:i386 was installed by trying to install it and it shows the that:

libncurses5:i386 is already the newest version (6.2-0ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I tried one more time a little differently:

sudo apt-get -y install libc6:i386 libstdc++6:i386 libncurses5:i386 libudev1:i386

Then libudev1:i386 was the only package to install. But if I try to find the file:

~$ locate libncurses5:i386

Then I get five file in this location:

/var/lib/dpkg/info/libncurses5:i386.list
/var/lib/dpkg/info/libncurses5:i386.md5sums
/var/lib/dpkg/info/libncurses5:i386.shlibs
/var/lib/dpkg/info/libncurses5:i386.symbols
/var/lib/dpkg/info/libncurses5:i386.triggers

It's like Schödinger File...

1

There are 1 best solutions below

5
On

First of all, since you are running a 64 bit version of Ubuntu, you should verify you installed the Linux 64 bit version of the Arduino IDE v1.18.13. If this is not the case, this may explain why installing i386 packages did not fix your problem - If you did not, I would strongly suggest to remove the Linux 32 bit version, and install the Linux 64 bit version instead.

This verification can be done by executing the following command:

file ~/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gdb

You should see something like:

/home/user/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gdb: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.8, stripped

The important information here would be ELF 64-bit LSB executable.

The 64 bit version of libncurses.so.5 is of course missing:

ldd ~/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gdb
        linux-vdso.so.1 (0x00007ffccf1ed000)
        libncurses.so.5 => not found
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f68fa317000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f68fa125000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f68fa11f000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f68fa482000)

It can be installed using the following command:

sudo apt-get install libncurses5

After running sudo ldconfig:

ldd  ~/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gdb
        linux-vdso.so.1 (0x00007ffcc41f5000)
        libncurses.so.5 => /lib/x86_64-linux-gnu/libncurses.so.5 (0x00007f890c00d000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f890bebe000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f890bccc000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f890bcc6000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f890bc98000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f890c04f000)

Your GDB should now be functional:

~/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gdb -tui

Arduino-provided arm-none-eabi-gdb

Note that the same kind of issues may happen with the GNU Arm Embedded Toolchain as well on Ubuntu 20.04.1. It can be fixed by installing the missing packages:

sudo apt-get install libtinfo5 libncursesw5 libpython2.7