python-rocksdb icon indicating copy to clipboard operation
python-rocksdb copied to clipboard

Compression type XXX is not linked with the binary

Open Lbqds opened this issue 6 years ago • 3 comments

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.'
>>>

Lbqds avatar Apr 30 '19 01:04 Lbqds

Did you install snappy library?

twmht avatar Apr 30 '19 01:04 twmht

yes, I did

Lbqds avatar Apr 30 '19 08:04 Lbqds

@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

631068264 avatar Jul 05 '19 06:07 631068264