riscv64-unknown-elf-cpp command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
riscv64-unknown-elf-cpp: command not found
or when using sudo you get the following error message
sudo: riscv64-unknown-elf-cpp: command not found
Solutions to riscv64-unknown-elf-cpp: command not found
How To Fix riscv64-unknown-elf-cpp: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu riscv64-unknown-elf-cpp is provided by gcc-riscv64-unknown-elf package.
gcc-riscv64-unknown-elf is:
Bare metal compiler for embedded RISC-V chips supporting both 64 and 32 bit architectures. This package includes patches for vendor-specific ISA extensions.
To fix this problem, we can install more using the command below.
sudo apt-get -y install gcc-riscv64-unknown-elf
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install gcc-riscv64-unknown-elf.
sudo apt -y install gcc-riscv64-unknown-elf
Or if you have aptitude installed you can use the following command.
sudo aptitude install gcc-riscv64-unknown-elf
Summary
In this tutorial we learn how to fix riscv64-unknown-elf-cpp command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.