我最近使用sudo apt-get install gcc-arm-none-eabi
在Ubuntu 18.10上安装了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
我不确定从这里尝试什么。任何帮助将不胜感激。
答案 0 :(得分:2)
我在Kubuntu19.10安装上正常工作:
apt install libncurses5
未安装库的32位版本“ -dev”,开发版或“:i386”。
答案 1 :(得分:0)
我从here安装了ubuntu桌面18.10,但无法安装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模式,您应该像我一样喜欢它-我想。
答案 2 :(得分:0)
我通过从启动板下载the 2019 version from arm.com而不是2015版本来在Kubuntu19.10上运行它。