We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – How To Install LevelDB on Ubuntu 22.04|20.04|18.04

Learn how to – How To Install LevelDB on Ubuntu 22.04|20.04|18.04.

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values. The leveldb library provides a persistent key-value store. Keys and values are arbitrary byte arrays. The keys are ordered within the key-value store according to a user-specified comparator function. Prometheus LevelDB to store indexes

Install LevelDB on Ubuntu 22.04|20.04|18.04

Install all required dependencies:

sudo apt update
sudo apt-get install libsnappy-dev wget curl build-essential cmake gcc sqlite3

Check LevelDB releases page to see the latest release of the application. Then define it by setting VER variable.

VER=$(curl -s https://api.github.com/repos/google/leveldb/releases/latest | grep tag_name |  cut -d '"' -f 4)

Download LevelDB archive file.

wget https://github.com/google/leveldb/archive/${VER}.tar.gz -O leveldb.tar.gz

Extract the file downloaded using tar:

tar xvf leveldb.tar.gz

Change your working directory to leveldb.

cd leveldb*/

Install LevelDB on Ubuntu 22.04|20.04|18.04

mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build .

That’s all, you have LevelDB installed on your Ubuntu 22.04|18.04|16.04 server.

For Usage, check out LevelDB Library documentation.

Cart

Your Cart is Empty

Back To Shop