Installation Error - fatal error: rocksdb/slice.h: No such file or directory
See original GitHub issueHi Stephan, upon installing pyrocksdb, I get the error below:
It has to do with the rocksdb libraries. I’m not sure if should place certain rocksdb files somewhere in order for this to work.
sudo pip install git+git://github.com/stephan-hof/pyrocksdb.git
Downloading/unpacking git+git://github.com/stephan-hof/pyrocksdb.git Cloning git://github.com/stephan-hof/pyrocksdb.git to /tmp/pip-mHdZe8-build Running setup.py egg_info for package from git+git://github.com/stephan-hof/pyrocksdb.git missing cimport in module ‘pair’: /usr/local/lib/python2.7/dist-packages/Cython/Includes/libcpp/deque.pxd Compiling rocksdb/_rocksdb.pyx because it changed. Cythonizing rocksdb/_rocksdb.pyx
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from pyrocksdb==0.1) Requirement already satisfied (use --upgrade to upgrade): Cython>=0.20 in /usr/local/lib/python2.7/dist-packages (from pyrocksdb==0.1) Installing collected packages: pyrocksdb Running setup.py install for pyrocksdb missing cimport in module ‘pair’: /usr/local/lib/python2.7/dist-packages/Cython/Includes/libcpp/deque.pxd
building 'rocksdb._rocksdb' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c rocksdb/_rocksdb.cpp -o build/temp.linux-x86_64-2.7/rocksdb/_rocksdb.o -std=gnu++11 -O3 -Wall -Wextra -Wconversion -fno-strict-aliasing
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
rocksdb/_rocksdb.cpp:348:27: fatal error: rocksdb/slice.h: No such file or directory
#include "rocksdb/slice.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-mHdZe8-build/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-N8DNKA-record/install-record.txt --single-version-externally-managed:
missing cimport in module 'pair': /usr/local/lib/python2.7/dist-packages/Cython/Includes/libcpp/deque.pxd
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/rocksdb
copying rocksdb/interfaces.py -> build/lib.linux-x86_64-2.7/rocksdb
copying rocksdb/init.py -> build/lib.linux-x86_64-2.7/rocksdb
copying rocksdb/errors.py -> build/lib.linux-x86_64-2.7/rocksdb
creating build/lib.linux-x86_64-2.7/rocksdb/tests
copying rocksdb/tests/test_options.py -> build/lib.linux-x86_64-2.7/rocksdb/tests
copying rocksdb/tests/init.py -> build/lib.linux-x86_64-2.7/rocksdb/tests
copying rocksdb/tests/test_db.py -> build/lib.linux-x86_64-2.7/rocksdb/tests
running egg_info
creating pyrocksdb.egg-info
writing requirements to pyrocksdb.egg-info/requires.txt
writing pyrocksdb.egg-info/PKG-INFO
writing top-level names to pyrocksdb.egg-info/top_level.txt
writing dependency_links to pyrocksdb.egg-info/dependency_links.txt
writing manifest file ‘pyrocksdb.egg-info/SOURCES.txt’
warning: manifest_maker: standard file ‘-c’ not found
reading manifest file ‘pyrocksdb.egg-info/SOURCES.txt’
writing manifest file ‘pyrocksdb.egg-info/SOURCES.txt’
copying rocksdb/_rocksdb.cpp -> build/lib.linux-x86_64-2.7/rocksdb
running build_ext
building ‘rocksdb._rocksdb’ extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/rocksdb
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c rocksdb/_rocksdb.cpp -o build/temp.linux-x86_64-2.7/rocksdb/_rocksdb.o -std=gnu++11 -O3 -Wall -Wextra -Wconversion -fno-strict-aliasing
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
rocksdb/_rocksdb.cpp:348:27: fatal error: rocksdb/slice.h: No such file or directory
#include “rocksdb/slice.h”
^
compilation terminated.
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
Cleaning up… Command /usr/bin/python -c “import setuptools;file=‘/tmp/pip-mHdZe8-build/setup.py’;exec(compile(open(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-N8DNKA-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-mHdZe8-build Storing complete log in /home/a/.pip/pip.log
Issue Analytics
- State:
- Created 10 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
On OSX I was able to resolve this issue by first installing rocksdb using homebrew:
@guguncube, thanks for installation guide. One additional thing was needed for me: add
sudo ldconfig
after copying shared libraries:It would be nice if you will update your post.