python-rocksdb
python-rocksdb copied to clipboard
Compression type XXX is not linked with the binary
in Mac OS and ubuntu 18.04, I have install rocksdb(v5.18.3) as README include snappy/lz4, and python-rocksdb-0.7.0, Mac OS works fine, but in ubuntu 18.04, error happen, code as follow:
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rocksdb
>>> options = rocksdb.Options()
>>> options.create_if_missing = True
>>> options.compression = rocksdb.CompressionType.snappy_compression
>>> db = rocksdb.DB("test.db", options)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "rocksdb/_rocksdb.pyx", line 1636, in rocksdb._rocksdb.DB.__cinit__
File "rocksdb/_rocksdb.pyx", line 82, in rocksdb._rocksdb.check_status
rocksdb.errors.InvalidArgument: b'Invalid argument: Compression type Snappy is not linked with the binary.'
>>>
Did you install snappy library?
yes, I did
@Lbqds have you solved?
I have install
apt-get install -y librocksdb-dev libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev
I use it in docker ubuntu
When I try zlib_compression save me, I use lz4_compression before and got the similar error