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)
编译:文章来源:https://www.toymoban.com/news/detail-553506.html
mkdir build
cd build && cmake -DCMAKE_INSTALL_PREFIX="/usr" ../ && make
安装:文章来源地址https://www.toymoban.com/news/detail-553506.html
sudo make install
到了这里,关于ubuntu 22.04 安装 snappy,error while loading shared libraries: libsnappy.so.1的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!