1

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

Carbon
  • 11
  • 1
  • 4
  • Please replace the link to the images by textual output formatted in code in your question - use the 'double brace' menu item for this. – Frant Sep 24 '20 at 14:40
  • Can you run `ls -ld $(dpkg -S libncurses.so.5)` to see if the file exists? – Mark Plotnick Sep 24 '20 at 17:45
  • @Frant - Thanks for the ProTip, but the rules are "You need at least 10 reputation to post images". So the only way I could post the images was to link them like I did. Sorry, it's a little Busch league but the best I could do. – Carbon Sep 26 '20 at 16:36
  • @MarkPlotnick - I replied to you up in my post. I think you're on to something. It seems these files are there and they're not there... :/ – Carbon Sep 26 '20 at 18:14
  • @Carbon: my point was: do not provide images when you can provide text. – Frant Sep 28 '20 at 14:10

1 Answers1

1

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

Frant
  • 5,382
  • 1
  • 16
  • 22
  • It installed libncursew5 and libpython2.7, then apt update, but no fix yet. – Carbon Sep 26 '20 at 17:37
  • 1) Did you run the exact command above ? libtinfo5 was needed in my brand new system. 2) Are you getting an error message ? If yes, which one ? – Frant Sep 28 '20 at 14:09
  • Hi @Carbon if this or any answer has solved your question please consider accepting it by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. There is no obligation to do this. – Frant Oct 05 '20 at 09:43
  • Hey @Frant. Thanks, but these didn't solve the issue. I'm presently reinstalling Ubuntu 20.04 and starting from scratch with Arduino IDE... I'll post back so. Probably over the weekend. I must have broken a symlink or some else. – Carbon Oct 07 '20 at 11:06
  • And user *Carbon* [left the building 8 days later](https://www.explainxkcd.com/wiki/index.php/979:_Wisdom_of_the_Ancients). – Peter Mortensen Jan 19 '21 at 13:26