How To Install golang-github-d2r2-go-i2c-dev on Kali Linux

In this tutorial we learn how to install golang-github-d2r2-go-i2c-dev on Kali Linux. golang-github-d2r2-go-i2c-dev is I2C-bus interaction of peripheral sensors with single-board computers (library)

Introduction

In this tutorial we learn how to install golang-github-d2r2-go-i2c-dev on Kali Linux.

What is golang-github-d2r2-go-i2c-dev

golang-github-d2r2-go-i2c-dev is:

This library written in Go is intended to activate and interact with the I2C (Inter-Integrated Circuit) bus by reading and writing data. The i2c library is a starting point to interact with various peripheral devices and sensors for use on embedded Linux devices.

Following libraries for the listed devices and sensors use this i2c library:

  • go-hd44780: Liquid-crystal display driven by Hitachi HD44780 IC
  • go-bsbmp: BMP180/BMP280/BME280 temperature and pressure sensors
  • go-aosong: DHT12/AM2320 humidity and temperature sensors
  • go-si7021: Si7021 relative humidity and temperature sensor
  • go-sht3x: SHT3x humidity and temperature sensor
  • go-vl53l0x: VL53L0X time-of-flight ranging sensor
  • go-bh1750: BH1750 ambient light sensor
  • go-mpl3115a2: MPL3115A2 pressure and temperature sensor

There are three methods to install golang-github-d2r2-go-i2c-dev on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install golang-github-d2r2-go-i2c-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install golang-github-d2r2-go-i2c-dev using apt-get by running the following command:

sudo apt-get -y install golang-github-d2r2-go-i2c-dev

Install golang-github-d2r2-go-i2c-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install golang-github-d2r2-go-i2c-dev using apt by running the following command:

sudo apt -y install golang-github-d2r2-go-i2c-dev

Install golang-github-d2r2-go-i2c-dev Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install golang-github-d2r2-go-i2c-dev using aptitude by running the following command:

sudo aptitude -y install golang-github-d2r2-go-i2c-dev

How To Uninstall golang-github-d2r2-go-i2c-dev on Kali Linux

To uninstall only the golang-github-d2r2-go-i2c-dev package we can use the following command:

sudo apt-get remove golang-github-d2r2-go-i2c-dev

Uninstall golang-github-d2r2-go-i2c-dev And Its Dependencies

To uninstall golang-github-d2r2-go-i2c-dev and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove golang-github-d2r2-go-i2c-dev

Remove golang-github-d2r2-go-i2c-dev Configurations and Data

To remove golang-github-d2r2-go-i2c-dev configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge golang-github-d2r2-go-i2c-dev

Remove golang-github-d2r2-go-i2c-dev configuration, data, and all of its dependencies

We can use the following command to remove golang-github-d2r2-go-i2c-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge golang-github-d2r2-go-i2c-dev

Dependencies

golang-github-d2r2-go-i2c-dev have the following dependencies:

References

Summary

In this tutorial we learn how to install golang-github-d2r2-go-i2c-dev package on Kali Linux using different package management tools: apt, apt-get and aptitude.