ubuntu 22.04 安装 snappy,error while loading shared libraries: libsnappy.so.1
【代码】ubuntu 22.04 安装 snappy,error while loading shared libraries: libsnappy.so.1。
·
error while loading shared libraries: libsnappy.so.1
GitHub - google/snappy: A fast compressor/decompressor
下载源代码:
git clone --recursive https://github.com/google/snappy.git
cd snappy
git submodule update --init
修改CMakeLists.txt下面的行,如果cpu不是太老的话,特别是 AVX2的支持:
option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." ON)
option(SNAPPY_BUILD_TESTS "Build Snappy's own tests." ON)
option(SNAPPY_BUILD_BENCHMARKS "Build Snappy's benchmarks" ON)
option(SNAPPY_FUZZING_BUILD "Build Snappy for fuzzing." OFF)
option(SNAPPY_REQUIRE_AVX "Target processors with AVX support." ON)
option(SNAPPY_REQUIRE_AVX2 "Target processors with AVX2 support." ON)
option(SNAPPY_INSTALL "Install Snappy's header and library" ON)
编译:
mkdir build
cd build && cmake -DCMAKE_INSTALL_PREFIX="/usr" ../ && make
安装:
sudo make install
更多推荐
已为社区贡献2条内容
所有评论(0)