消息“无法运行arm-none-eabi-gdb:找不到libncurses.so.5”

问题描述 投票:1回答:1

我最近使用sudo apt-get install gcc-arm-none-eabi在Ubuntu 18.10(Cosmic Cuttlefish)上安装了ARM GCC工具链,并试图运行arm-none-eabi-gdb

[每当我尝试运行它时,都会出现以下错误:

arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

我尝试使用sudo apt-get install libncurses5-dev libncursesw5-dev安装libncurses-成功安装了库,但是仍然存在相同的问题。

我还检查以确保文件为64位: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]=340c78388950836989ecda5c89474e1bf7b03820, stripped

我可以从这里尝试什么?

ubuntu arm gnu
1个回答
0
投票

我从here安装了Ubuntu 18.10桌面(Cosmic Cuttlefish),但无法安装gcc-arm-none-eabi:

ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:        18.10
Codename:       cosmic

ubuntu@ubuntu:~$ sudo apt-get install gcc-arm-none-eabi
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gcc-arm-none-eabi

然后我安装了libncurses5-dev和gcc-linaro-7.3.1-2018.05-x86_64_arm,并得到了与您相同的.so相关错误。

由于我在16.04和18.04中都没有这个问题,所以建议您从源代码编译最新的GDB,以避免在Ubuntu 18.10中出现程序包/动态链接库不匹配的问题:

sudo apt-get install build-essential libncurses5-dev libexpat1-dev texinfo-doc-nonfree
pushd /tmp
wget -qO- ftp://ftp.gnu.org/gnu/gdb/gdb-8.2.tar.xz | tar Jxv
mkdir gdb
cd gdb
../gdb-8.2/configure  --enable-tui --with-expat --prefix=/usr/local  --target=arm-eabi --program-prefix=arm-eabi-
make all
sudo make  install
popd

即使我安装了texinfo-doc-nonfree,由于缺少makeinfo,安装将失败,但是将安装二进制文件:

ls /usr/local/bin
arm-eabi-gdb  arm-eabi-gdb-add-index  arm-eabi-run

并且arm-eabi-gdb这次将正常启动:

arm-eabi-gdb --version
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

arm-eabi-gdb -tui也可以工作-我鼓励您使用TUI模式。您应该像我一样喜欢它-我想。

© www.soinside.com 2019 - 2024. All rights reserved.