You are not logged in.

#1 2020-04-14 06:21:47

pauledd
Member
Registered: 2019-12-14
Posts: 42

error while loading shared libraries: libncurses.so.5 [SOLVED]

Hi

I am developing with STM32CubeIDE which comes with its own build toolchain.
The problem is if I try to debug my application it runs this command:

/home/p/st/stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb --version

which gives me an:

error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

I already have "multilib/lib32-ncurses 6.2-1" and "lib32-ncurses5-compat-libs-6.1-2" installed, but still it cant find the "libncurses.so.5" file.
Whats the problem here?

Last edited by pauledd (2020-04-14 07:18:46)

Offline

#2 2020-04-14 06:44:25

pauledd
Member
Registered: 2019-12-14
Posts: 42

Re: error while loading shared libraries: libncurses.so.5 [SOLVED]

ldd gives this:

# ldd st/stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb
        linux-vdso.so.1 (0x00007fff13bda000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007ff4b8049000)
        libncurses.so.5 => not found
        libtinfo.so.5 => not found
        libm.so.6 => /usr/lib/libm.so.6 (0x00007ff4b7f03000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007ff4b7d3d000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ff4b80af000)

but the files are there:

# ls -la /usr/lib32/libncurses* /usr/lib32/libtinfo.so*
lrwxrwxrwx 1 root root     15 20. Mär 17:25 /usr/lib32/libncurses++.a -> libncurses++w.a
-rw-r--r-- 1 root root     18 20. Mär 17:25 /usr/lib32/libncurses.so
lrwxrwxrwx 1 root root     16 13. Apr 17:21 /usr/lib32/libncurses.so.5 -> libncursesw.so.5
-rw-r--r-- 1 root root 114094 20. Mär 17:25 /usr/lib32/libncurses++w.a
lrwxrwxrwx 1 root root     16 20. Mär 17:25 /usr/lib32/libncursesw.so -> libncursesw.so.6
lrwxrwxrwx 1 root root     18 13. Apr 17:21 /usr/lib32/libncursesw.so.5 -> libncursesw.so.5.9
-rwxr-xr-x 1 root root 403260 13. Apr 17:21 /usr/lib32/libncursesw.so.5.9
lrwxrwxrwx 1 root root     18 20. Mär 17:25 /usr/lib32/libncursesw.so.6 -> libncursesw.so.6.2
-rwxr-xr-x 1 root root 464988 20. Mär 17:25 /usr/lib32/libncursesw.so.6.2
-rw-r--r-- 1 root root     24 20. Mär 17:25 /usr/lib32/libtinfo.so
lrwxrwxrwx 1 root root     16 13. Apr 17:21 /usr/lib32/libtinfo.so.5 -> libncursesw.so.5
lrwxrwxrwx 1 root root     16 20. Mär 17:25 /usr/lib32/libtinfo.so.6 -> libncursesw.so.6

Offline

#3 2020-04-14 06:53:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: error while loading shared libraries: libncurses.so.5 [SOLVED]

Why is it resolving the 64bit libs for libm and libc?
Is this a 32bit binary?
Does it need an extended LD_LIBRARY_PATH to look at /usr/lib32?

Offline

#4 2020-04-14 07:06:01

pauledd
Member
Registered: 2019-12-14
Posts: 42

Re: error while loading shared libraries: libncurses.so.5 [SOLVED]

I dont know, I am not very deep into that library stuff.

I tried this to force the binary to look into lib/32:

# LD_LIBRARY_PATH=/usr/lib32 st/stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb

st/stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb:error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS32

# file st/stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb

st/stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=a101270e37275f0fff5721e60b62155e4d768f62, stripped

Last edited by pauledd (2020-04-14 07:08:12)

Offline

#5 2020-04-14 07:10:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: error while loading shared libraries: libncurses.so.5 [SOLVED]

seth wrote:

Is this a 32bit binary?

com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb

wrong ELF class: ELFCLASS32

Edit:
file st/stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/arm-none-eabi-gdb
https://aur.archlinux.org/packages/ncur … mpat-libs/

Last edited by seth (2020-04-14 07:11:14)

Offline

#6 2020-04-14 07:18:26

pauledd
Member
Registered: 2019-12-14
Posts: 42

Re: error while loading shared libraries: libncurses.so.5 [SOLVED]

cool ! Works now, thanks a lot!

Offline

#7 2023-02-21 11:46:27

heigre
Member
Registered: 2023-01-20
Posts: 2

Re: error while loading shared libraries: libncurses.so.5 [SOLVED]

This solved it for me too, thank you!

Offline

#8 2023-02-21 12:36:00

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: error while loading shared libraries: libncurses.so.5 [SOLVED]

Closing this old solved thread.

Offline

Board footer

Powered by FluxBB