How to fix build 'lz4 library not found, compiling without it'

Problem:

When compiling a piece of software - for example in your Dockerfile or on your PC - you see a warning message like

lz4 library not found, compiling without it

lz4_not_found.txt
lz4 library not found, compiling without it

Solution

Install liblz4, which is a library for a compression algorithm. On Ubuntu/Debian based systems you can install it using

install_liblz4.sh
sudo apt -y install liblz4-dev

In your Dockerfile, install using

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

Otherwise, refer to the liblz4 GitHub page.


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