I found the solution based on the discussion available at https://unix.stackexchange.com/questions/377345/installing-arm-none-eabi-gcc and the documentation available on https://mynewt.apache.org/latest/get_started/native_install/cross_tools.html#installing-the-arm-cross-toolchain.

The name and structure of the software changed over time. The arm-none-eabi-gcc is gcc-arm-none-eabi now, and so on.

Copy$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
$ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
$ sudo apt-get update 
$ sudo apt-get upgrade
$ sudo apt-get install gcc-arm-none-eabi
$ sudo apt-get install gdb-arm-none-eabi 

And finally, to verify the downloads, you can run the following commands:

Copyarm-none-eabi-gcc --version
arm-none-eabi-g++ --version
arm-none-eabi-size --version 
Answer from Aatif Shaikh on Stack Overflow
Discussions

apt - How to install a functional ARM cross-GCC toolchain on Ubuntu 18.04 (Bionic Beaver) - Unix & Linux Stack Exchange
Context I recently installed Ubuntu 18.04, Linux foobar-VirtualBox 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux on a VM. I want to cross-compile More on unix.stackexchange.com
🌐 unix.stackexchange.com
July 2, 2018
ubuntu Unable to locate package gcc-arm-embedded
tools setup instructions for Linux(Ubuntu-20.04x) needs a small correction: sudo apt -y install gcc-arm-none-eabi make stlink-tools (Instead of gcc-arm-embedded, use gcc-arm-none-eabi) More on github.com
🌐 github.com
0
December 6, 2022
arm-none-eabi-gcc command not found
Hi, I am using Debian 8.2 out-of-the-box install and after make clean diet i got this error: arm-none-eabi-gcc command not found Please help. More on github.com
🌐 github.com
5
May 9, 2016
Build configuration for the pico (and other arms)
Hello there. I was configuring a virtual machine to build micropython and I had some issues. I have already had the same issues when configuring two Linux installations and I solved them with some ... More on github.com
🌐 github.com
1
1
March 11, 2023
Top answer
1 of 5
10

I got it working on Kubuntu 19.10 installing:

apt install libncurses5

Not installing the "-dev", development or ":i386", 32-bit versions of the library.

2 of 5
0

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

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.

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

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

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 will work as well - I encourage you to use the TUI mode. You should like it as much as I do - I guess.

🌐
Arm Community
community.arm.com › support-forums › f › compilers-and-libraries-forum › 52805 › gcc-arm-11-2-2022-02-x86_64-arm-none-eabi-gdb-fails-on-ubuntu
gcc-arm-11.2-2022.02-x86_64-arm-none-eabi gdb FAILS ...
May 18, 2022 - Have a question about working on Arm technology? Browse our support forums for solutions to your questions, answer questions from fellow community members and get help from Arm experts.
🌐
Pmortensen
pmortensen.eu › world2 › 2019 › 12 › 08 › arm-toolchain-ubuntu-19-04-black-magic-probe
Getting the ARM toolchain to work on Ubuntu 19.04 and later (including for Black Magic Probe (BMP)) – More professional engineering
December 8, 2019 - Before starting, uninstall any already-installed ARM GCC cross compiler (this command can be used unconditionally – if it is not installed, it will report “Package ‘gcc-arm-none-eabi’ is not installed, so not removed”): ... Instead of using apt-get, we get the toolchain directly from ...
🌐
GitHub
github.com › cpq › bare-metal-programming-guide › issues › 3
ubuntu Unable to locate package gcc-arm-embedded · Issue #3 · cpq/bare-metal-programming-guide
December 6, 2022 - tools setup instructions for Linux(Ubuntu-20.04x) needs a small correction: sudo apt -y install gcc-arm-none-eabi make stlink-tools (Instead of gcc-arm-embedded, use gcc-arm-none-eabi)
Author   cpq
Find elsewhere
🌐
GitHub
github.com › travisgoodspeed › md380tools › issues › 103
arm-none-eabi-gcc command not found · Issue #103 · travisgoodspeed/md380tools
May 9, 2016 - arm-none-eabi-gcc command not found#103 · Copy link · webkernel · opened · on May 9, 2016 · Issue body actions · Hi, I am using Debian 8.2 out-of-the-box install and after make clean diet i got this error: arm-none-eabi-gcc command not found · Please help.
Author   travisgoodspeed
🌐
Launchpad
answers.launchpad.net › gcc-arm-embedded › +question › 289287
Question #289287 “How to add specific version for the tool chain...” : Questions : GNU Arm Embedded Toolchain
Dear sir: When I do aws_starter_sdk Follow the<document: sudo apt-get install gcc-arm-embedded success Then: developer@ ... But when I try to remove, it complain cannot find the package. I use apt-cache search arm-none to remove it one by one · I try to install new version, now it cannot find the package developer@ ... q3-update Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package arm-none-eabi-gcc
🌐
Launchpad
answers.launchpad.net › gcc-arm-embedded › +question › 708037
Question #708037 “404 not found does not have a Release file.” : Questions : GNU Arm Embedded Toolchain
September 26, 2023 - ~$ sudo apt install gcc-arm-none-eabi Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: gcc-arm-none-eabi 0 upgraded, 1 newly installed, 0 to remove and 216 not upgraded. Need to get 0 B/31.6 MB of archives.
🌐
DevManuals
devmanuals.net › install › ubuntu › ubuntu-16-04-LTS-Xenial-Xerus › how-to-install-gcc-arm-none-eabi.html
How to install gcc-arm-none-eabi On Ubuntu 16.04 Lts? Uninstall and remove gcc-arm-none-eabi Package
After downloading the latest package list with the help of above you can run the installation process. If gcc-arm-none-eabi is not installed on your compter then the command 'dpkg -L gcc-arm-none-eabi' will give followin error.
🌐
Blogger
esplatforms.blogspot.com › 2014 › 01 › setting-arm-enviroment-on-linux-with.html
Embedded System Platforms: Setting the ARM enviroment on Linux with Cortex M4F - Stellaris
January 21, 2014 - sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded sudo apt-get update And just install the package: sudo apt-get install gcc-arm-none-eabi Obs.: if you have this error: E: Unable to locate package gcc-arm-none-eabi don't give up, just do this:
Top answer
1 of 5
49

It turned out that ARM decided to make our life easier (sarcasm) by deprecating the use of PPA - their page at launchpad now has an anouncement: "... all new binary and source packages will not be released on Launchpad henceforth ...".

So, to make use of their latest arm-none-eabi-gdb you have to install gcc-arm-embedded manually.

Remove arm-none-eabi-gcc from your system:

sudo apt remove gcc-arm-none-eabi

Download latest version (Linux x86_64 Tarball) from their website, check its MD5. Unpack it into some directory. I used /usr/share/ :

sudo tar xjf gcc-arm-none-eabi-YOUR-VERSION.bz2 -C /usr/share/

Create links so that binaries are accessible system-wide:

sudo ln -s /usr/share/gcc-arm-none-eabi-YOUR-VERSION/bin/arm-none-eabi-gcc /usr/bin/arm-none-eabi-gcc 
sudo ln -s /usr/share/gcc-arm-none-eabi-YOUR-VERSION/bin/arm-none-eabi-g++ /usr/bin/arm-none-eabi-g++
sudo ln -s /usr/share/gcc-arm-none-eabi-YOUR-VERSION/bin/arm-none-eabi-gdb /usr/bin/arm-none-eabi-gdb
sudo ln -s /usr/share/gcc-arm-none-eabi-YOUR-VERSION/bin/arm-none-eabi-size /usr/bin/arm-none-eabi-size
sudo ln -s /usr/share/gcc-arm-none-eabi-YOUR-VERSION/bin/arm-none-eabi-objcopy /usr/bin/arm-none-eabi-objcopy

Install dependencies. ARM's "full installation instructions" listed in readme.txt won't tell you what dependencies are - you have to figure it out by trial and error. In my system I had to manually create symbolic links to force it to work:

sudo apt install libncurses-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5
sudo ln -s /usr/lib/x86_64-linux-gnu/libtinfo.so.6 /usr/lib/x86_64-linux-gnu/libtinfo.so.5

Check if it works:

arm-none-eabi-gcc --version
arm-none-eabi-g++ --version
arm-none-eabi-gdb --version
arm-none-eabi-size --version
2 of 5
10

I've wrapped the script here by @kmhallen into a semi-automated debian package builder here: https://gitlab.com/alelec/arm-none-eabi-gcc-deb/-/releases

Installing a package like this means you can skip the tedious manual symlinks to put tools on the path, and just as importantly you can uninstall / upgrade to newer packages (assuming I remember to make more packages)

🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › hardware and peripherals › raspberry pi pico › general
[Solved] Wanting latest gcc-arm-none-eabi - Raspberry Pi Forums
December 5, 2021 - Sun Dec 05, 2021 8:40 pm Take a look at https://github.com/xpack-dev-tools/arm- ... -gcc-xpack Thanks. I didn't understand half of what it was saying about 'xpm' so I chose a manual install which I was more familiar with. Apart from running out of disk space and my Pi freezing, a second attempt seems to have worked - ... cd ~ wget https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.3.1-2.2/xpack-arm-none-eabi-gcc-10.3.1-2.2-linux-arm.tar.gz mkdir -p ~/opt/xPacks/arm-none-eabi-gcc cd ~/opt/xPacks/arm-none-eabi-gcc tar xvf ~/xpack-arm-none-eabi-gcc-10.3.1-2.2-linux-arm.tar.gz chmod -R -w xpack-arm-none-eabi-gcc-10.3.1-2.2
🌐
Marksolters
marksolters.com › programming › 2016 › 06 › 22 › arm-toolchain-16-04.html
ARM GCC Toolchain in Ubuntu 16.04
June 22, 2016 - sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded sudo apt-get update sudo apt-get install arm-gcc-none-eabi
🌐
Arm Community
community.arm.com › developer › ip-products › processors › f › cortex-m-forum › 8993 › installing-arm-gcc-toolchain-on-ubuntu
Challenge Validation
October 3, 2019 - Have a question? If you can, please take a moment to also see if there is a question that you are able to answer