Wednesday, September 3, 2025
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
32260 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6625 POSTS0 COMMENTS
Nicole Veronica
11795 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11855 POSTS0 COMMENTS
Shaida Kate Naidoo
6746 POSTS0 COMMENTS
Ted Musemwa
7023 POSTS0 COMMENTS
Thapelo Manthata
6694 POSTS0 COMMENTS
Umr Jansen
6714 POSTS0 COMMENTS