Introduction
In this tutorial we learn how to install protoc-gen-go
on Kali Linux.
What is protoc-gen-go
protoc-gen-go is:
It augments the protoc compiler so that it knows how to generate Go
specific code for a given .proto file.
This plugin is provided google.golang.org/protobuf module, aka the
second major revision of the Go protocol buffer API. Compared to
the old protoc-gen-go plugin (in golang-goprotobuf-dev package)
provided by github.com/golang/protobuf module, it doesn’t support
generating gRPC service definitions.
There are three methods to install protoc-gen-go
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 protoc-gen-go Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install protoc-gen-go
using apt-get
by running the following command:
sudo apt-get -y install protoc-gen-go
Install protoc-gen-go Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install protoc-gen-go
using apt
by running the following command:
sudo apt -y install protoc-gen-go
Install protoc-gen-go 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 protoc-gen-go
using aptitude
by running the following command:
sudo aptitude -y install protoc-gen-go
How To Uninstall protoc-gen-go on Kali Linux
To uninstall only the protoc-gen-go
package we can use the following command:
sudo apt-get remove protoc-gen-go
Uninstall protoc-gen-go And Its Dependencies
To uninstall protoc-gen-go
and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove protoc-gen-go
Remove protoc-gen-go Configurations and Data
To remove protoc-gen-go
configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge protoc-gen-go
Remove protoc-gen-go configuration, data, and all of its dependencies
We can use the following command to remove protoc-gen-go
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge protoc-gen-go
Dependencies
protoc-gen-go have the following dependencies:
References
Summary
In this tutorial we learn how to install protoc-gen-go
package on Kali Linux using different package management tools: apt
, apt-get
and aptitude
.