aviral sanjay
aviral sanjay

Reputation: 983

Unable to install Python-Rocksdb on Ubuntu 18.04

My commands for installing rocksdb were:

apt-get install build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev
git clone https://github.com/facebook/rocksdb.git
cd rocksdb
mkdir build && cd build
cmake ..
make
make install-shared INSTALL_PATH=/usr
cd ..
make install-shared INSTALL_PATH=/usr
apt-get install python-virtualenv python-dev librocksdb-dev
pip3 install python-rocksdb

I have also tried to install python-rocksdb using virtualenv.

Regardless of types of attempts, I get the following error:

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/home/aviral/dev/rocksdb/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-5kagbe5y/python-rocksdb/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-n3jza3pc/install-record.txt --single-version-externally-managed --compile --install-headers /home/aviral/dev/rocksdb/venv/include/site/python3.6/python-rocksdb" failed with error code 1 in /tmp/pip-install-5kagbe5y/python-rocksdb/

The full error is here.

Upvotes: 0

Views: 1834

Answers (1)

Dan Kleiman
Dan Kleiman

Reputation: 86

I just ran into this yesterday. It looks like there was just a PR into the facebook repo that removed store_index_in_file.

I got it working by checking out the previous tag and building from there.

Try cd rocksdb && git checkout tags/v5.17.2 && make install-shared INSTALL_PATH=/usr instead (adding the command to checkout the tag).

Upvotes: 2

Related Questions