How To Install golang-github-hashicorp-raft-mdb-dev on Ubuntu 18.04

In this tutorial we learn how to install golang-github-hashicorp-raft-mdb-dev on Ubuntu 18.04. golang-github-hashicorp-raft-mdb-dev is LMDB backend for Raft

Introduction

In this tutorial we learn how to install golang-github-hashicorp-raft-mdb-dev on Ubuntu 18.04.

What is golang-github-hashicorp-raft-mdb-dev

golang-github-hashicorp-raft-mdb-dev is:

This repository provides the raftmdb package. The package exports the MDBStore which is an implementation of both a LogStore and StableStore.

It is meant to be used as a backend for the raft package.

This implementation uses LMDB. LMDB has a number of advantages to other embedded databases includes transactions, MVCC, and lack of compaction.

The one disadvantage is because it is a C library, it requires the use of cgo which complicates cross compilation. For that reason, this is in a seperate package from raft, so that clients can avoid cgo if they so choose.

This package contains the source.

There are three methods to install golang-github-hashicorp-raft-mdb-dev 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 golang-github-hashicorp-raft-mdb-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-hashicorp-raft-mdb-dev using apt-get by running the following command:

sudo apt-get -y install golang-github-hashicorp-raft-mdb-dev

Install golang-github-hashicorp-raft-mdb-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install golang-github-hashicorp-raft-mdb-dev using apt by running the following command:

sudo apt -y install golang-github-hashicorp-raft-mdb-dev

Install golang-github-hashicorp-raft-mdb-dev 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 golang-github-hashicorp-raft-mdb-dev using aptitude by running the following command:

sudo aptitude -y install golang-github-hashicorp-raft-mdb-dev

How To Uninstall golang-github-hashicorp-raft-mdb-dev on Ubuntu 18.04

To uninstall only the golang-github-hashicorp-raft-mdb-dev package we can use the following command:

sudo apt-get remove golang-github-hashicorp-raft-mdb-dev

Uninstall golang-github-hashicorp-raft-mdb-dev And Its Dependencies

To uninstall golang-github-hashicorp-raft-mdb-dev and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove golang-github-hashicorp-raft-mdb-dev

Remove golang-github-hashicorp-raft-mdb-dev Configurations and Data

To remove golang-github-hashicorp-raft-mdb-dev configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge golang-github-hashicorp-raft-mdb-dev

Remove golang-github-hashicorp-raft-mdb-dev configuration, data, and all of its dependencies

We can use the following command to remove golang-github-hashicorp-raft-mdb-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge golang-github-hashicorp-raft-mdb-dev

References

Summary

In this tutorial we learn how to install golang-github-hashicorp-raft-mdb-dev package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.