How To Install ruby-google-protobuf on Ubuntu 18.04
Introduction
In this tutorial we learn how to install ruby-google-protobuf
on Ubuntu 18.04.
What is ruby-google-protobuf
ruby-google-protobuf is:
Protocol Buffers are Google’s data interchange format.
This library contains the Ruby extension that implements Protocol Buffers functionality in Ruby.
The Ruby extension makes use of generated Ruby code that defines message and enum types in a Ruby DSL. You may write definitions in this DSL directly, but we recommend using protoc’s Ruby generation support with .proto files. The build process in this directory only installs the extension; you need to install protoc as well to have Ruby code generation functionality.
There are three methods to install ruby-google-protobuf
on Ubuntu 18.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install ruby-google-protobuf Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install ruby-google-protobuf
using apt-get
by running the following command:
sudo apt-get -y install ruby-google-protobuf
Install ruby-google-protobuf Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install ruby-google-protobuf
using apt
by running the following command:
sudo apt -y install ruby-google-protobuf
Install ruby-google-protobuf Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install ruby-google-protobuf
using aptitude
by running the following command:
sudo aptitude -y install ruby-google-protobuf
How To Uninstall ruby-google-protobuf on Ubuntu 18.04
To uninstall only the ruby-google-protobuf
package we can use the following command:
sudo apt-get remove ruby-google-protobuf
Uninstall ruby-google-protobuf And Its Dependencies
To uninstall ruby-google-protobuf
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove ruby-google-protobuf
Remove ruby-google-protobuf Configurations and Data
To remove ruby-google-protobuf
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge ruby-google-protobuf
Remove ruby-google-protobuf configuration, data, and all of its dependencies
We can use the following command to remove ruby-google-protobuf
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge ruby-google-protobuf
References
Summary
In this tutorial we learn how to install ruby-google-protobuf
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.