openocd command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
openocd: command not found
or when using sudo you get the following error message
sudo: openocd: command not found
Solutions to openocd: command not found
How To Fix openocd: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu openocd is provided by openocd package.
openocd is:
OpenOCD aims to provide debugging, in-system programming and boundary-scan testing for embedded target devices.
The debugger uses an IEEE 1149-1 compliant JTAG TAP bus master to access on-chip debug functionality available on ARM based microcontrollers or system-on-chip solutions. For MIPS systems the EJTAG interface is supported. Additionally there is support for eSi-RISC, Intel, OpenRISC, RISC-V and ARC controllers.
User interaction is realized through a telnet command line interface, a gdb (the GNU debugger) remote protocol server, and a simplified RPC connection that can be used to interface with OpenOCD’s Jim Tcl engine.
OpenOCD supports many different types of JTAG interfaces/programmers.
To fix this problem, we can install more using the command below.
sudo apt-get -y install openocd
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install openocd.
sudo apt -y install openocd
Or if you have aptitude installed you can use the following command.
sudo aptitude install openocd
Summary
In this tutorial we learn how to fix openocd command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.