DEV Community

Vee Satayamas
Vee Satayamas

Posted on

5 2

How I install RocksDB

I want to install a specific version of RocksDB across different machines with different operating systems. Thus I can't rely on APT or other package management systems. I followed INSTALL.md by running make on the bundled Makefile, but last Saturday, I found that RocksDB couldn't read Snappy compressed data, although I installed the "libsnappy-dev" package. I tried many different ways to enable Snappy support. Then I decided to use CMake, which appeared only once in INSTALL.md. Now it works. My install script looks like this:

#!/bin/bash 
wget https://github.com/facebook/rocksdb/archive/refs/tags/v6.15.5.tar.gz -O - \ 
   | gzip -d \ 
   | tar -xf - \ 
   && pushd rocksdb-6.15.5 \ 
   && cmake -DWITH_SNAPPY=YES -DCMAKE_INSTALL_PREFIX=$MTDIR . \ 
   && DEBUG_LEVEL=0 PREFIX=$MTDIR make -j $(nproc) \ 
   && DEBUG_LEVEL=0 PREFIX=$MTDIR make install \ 
   && popd
Enter fullscreen mode Exit fullscreen mode

$MTDIR is a target directory for installing RocksDB. DEBUG_LEVEL=0 and PREFIX=$MTDIR are perhaps not necessary.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs