Skip to content

Compile ZLIB on CentOS 7

Tested on version 1.3 on Centos 7

Requirements

Get ZLIB source

You can get ZLIB source from here or from GitHub

Build

bash
cd <ZLIB_SOURCE_DIR>
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<ZLIB_SOURCE_DIR>/install
cmake --build ./build --config Release --target install