消息“无法运行 arm-none-eabi-gdb:找不到 libncurses.so.5"; [英] Message "Unable to run arm-none-eabi-gdb: cannot find libncurses.so.5"

查看:93
本文介绍了消息“无法运行 arm-none-eabi-gdb:找不到 libncurses.so.5";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I recently installed the ARM GCC toolchain on Ubuntu 18.10 (Cosmic Cuttlefish) using sudo apt-get install gcc-arm-none-eabi and am trying to run arm-none-eabi-gdb.

每当我尝试运行它时,我都会收到以下错误:

Whenever I try to run it I get the following error:

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 - 库安装成功,但我仍然遇到同样的问题.

I have tried to install libncurses using sudo apt-get install libncurses5-dev libncursesw5-dev- the libraries installed successfully, but I still have the same issue.

我还检查以确保文件是 64 位:arm-none-eabi-gdb:ELF 64 位 LSB 可执行文件,x86-64,版本 1 (GNU/Linux),动态链接,解释器/lib64/ld-linux-x86-64.so.2,对于 GNU/Linux 2.6.24,BuildID[sha1]=340c78388950836989ecda5c89474e1bf7b03820,剥离

I also checked to make sure the file was 64 bit: 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

我可以从这里尝试什么?

What can I try from here?

推荐答案

我从 此处,但我无法安装 gcc-arm-none-eabi:

I installed Ubuntu 18.10 desktop (Cosmic Cuttlefish) from here, but I was unable to install 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 相关错误.

I then installed libncurses5-dev and gcc-linaro-7.3.1-2018.05-x86_64_arm and got the same .so-related error you got.

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

Since I don't have this issue with 16.04 nor with 18.04, I would suggest you compile the latest GDB from source in order to avoid what may be a package/dynamic link library mismatch issue in 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

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

Install will fail because makeinfo is missing, even though I installed texinfo-doc-nonfree, but binaries will be installed:

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

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

And arm-eabi-gdb will launch properly this time:

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 模式.你应该和我一样喜欢它 - 我想.

arm-eabi-gdb -tui will work as well - I encourage you to use the TUI mode. You should like it as much as I do - I guess.

这篇关于消息“无法运行 arm-none-eabi-gdb:找不到 libncurses.so.5";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆