arm-none-eabi-gdb無法執行

Mcreeper發表於2024-11-30

在ubuntu24.02下arm-none-eabi-gdb無法執行。
在STLINK驅動、OPENOCD配置正確的情況下,在STM32CUBEIDE中開啟openocd除錯或者直接使用命令arm-none-eabi-gdb ./xxx.elf除錯會得出如下錯誤

arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.3.20021019' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.1.20000708' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.6.20061217' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.0.19991023' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libtinfo.so.5: version `NCURSES_TINFO_5.0.19991023' not found (required by arm-none-eabi-gdb)

或者

arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5 not found

這是因為ubuntu24.02沒有libncurses5導致,apt也無法直接下載ubuntu24版本的,摸索結果是隻能下載以前版本的。
前往 https://pkgs.org/ 搜尋libncurses5下載安裝
對應軟體包前置軟體包下載地址,推薦用終端安裝可以看到安裝失敗原因 sudo dpkg -i xxx.deb
https://ubuntu.pkgs.org/20.04/ubuntu-universe-amd64/libtinfo5_6.2-0ubuntu2_amd64.deb.html
https://ubuntu.pkgs.org/22.04/ubuntu-updates-universe-amd64/libncurses5_6.3-2ubuntu0.1_amd64.deb.html
安裝之後無法燒錄與無法除錯的問題可以解決

相關文章