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

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

example.sh
sudo apt -y install liblz4-dev

In your Dockerfile, install using

Dockerfile
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