如何修复 build 'lz4 library not found, compiling without it'

问题:

编译软件时 - 例如在你的 Dockerfile 中或在你的 PC 上 - 你看到类似这样的警告消息

lz4 library not found, compiling without it

lz4_not_found.txt
lz4 library not found, compiling without it

解决方案

安装 liblz4,它是一个压缩算法库。在基于 Ubuntu/Debian 的系统上,你可以使用以下命令安装

install_liblz4.sh
sudo apt -y install liblz4-dev

在你的 Dockerfile 中,使用以下命令安装

Dockerfile_snippet
RUN apt update && apt install -y liblz4-dev && rm -rf /var/lib/apt/lists/*

否则,请参考 liblz4 GitHub 页面


Check out similar posts by category: C/C++, Docker