Thursday, February 5, 2026
HomeData Modelling & AIHow To Install LevelDB on Ubuntu 22.04|20.04|18.04

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.

RELATED ARTICLES

Most Popular

Dominic
32479 POSTS0 COMMENTS
Milvus
126 POSTS0 COMMENTS
Nango Kala
6849 POSTS0 COMMENTS
Nicole Veronica
11980 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12066 POSTS0 COMMENTS
Shaida Kate Naidoo
6988 POSTS0 COMMENTS
Ted Musemwa
7222 POSTS0 COMMENTS
Thapelo Manthata
6936 POSTS0 COMMENTS
Umr Jansen
6919 POSTS0 COMMENTS