cbindgen command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
cbindgen: command not found
or when using sudo you get the following error message
sudo: cbindgen: command not found
Solutions to cbindgen: command not found
How To Fix cbindgen: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu cbindgen is provided by cbindgen package.
cbindgen is:
cbindgen can be used to generate C bindings for Rust code. It is currently being developed to support creating bindings for WebRender (by Mozilla for Firefox), but has been designed to support any project.
Features:
- Builds bindings for a crate, its mods, its dependent crates, and their mods
- Only the necessary types for exposed functions are given bindings
- Can specify annotations for controlling some aspects of binding
- Support for generic structs and unions
- Support for exporting constants and statics
- Customizable formatting, can be used in C or C++ projects
- Support for generating #ifdef’s for #[cfg] attributes
- Support for #[repr(sized)] tagged enum’s
To fix this problem, we can install more using the command below.
sudo apt-get -y install cbindgen
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install cbindgen.
sudo apt -y install cbindgen
Or if you have aptitude installed you can use the following command.
sudo aptitude install cbindgen
Summary
In this tutorial we learn how to fix cbindgen command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.