Home > Software design >  E: Unable to locate package arm-none-eabi-gcc
E: Unable to locate package arm-none-eabi-gcc

Time:10-07

I'm working on a project in which I've to compile a MicroPython stack and build a firmware file for my STM32 boards. At present, I'm following through the instruction set given on https://docs.micropython.org/en/latest/develop/gettingstarted.html. Hence, to compile the code, I need an ARM cross-compiler (mentioned on the website). After entering the following command on the terminal "sudo apt-get install arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib", I'm getting some errors (basically, unable to locate packages). I tried googling a lot but didn't come across any relevant links. Does anyone know what I need to do? My pc configurations are AMD Ryzen 5 processor (IdeaPad 3 15ALC6), and I'm using Ubuntu 22.04.1 LTS OS. The snippet of the error is given below:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package arm-none-eabi-gcc
E: Unable to locate package arm-none-eabi-binutils
E: Unable to locate package arm-none-eabi-newlib

CodePudding user response:

In /etc/apt/sources.list, make sure the lines with universe are uncommented.

Re-run apt update and (as long as you have a working internter connection) it should work.

CodePudding user response:

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.

$ 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 install gcc-arm-none-eabi
$ sudo apt-get install gdb-arm-none-eabi 
  • Related