I am running Ubuntu 20.04 on Windows Subsystem for linux. Cmake is version 3.16.3. I am trying to build a project with a zlib dependency, and I get the following error...
Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.16/Modules/FindZLIB.cmake:115 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:1224 (find_package)
The line of code referenced in the error is as follows...
find_package(ZLIB REQUIRED)
package zlib1g is installed. How can I rectify this?
sudo apt-get install zlib1g-dev
I met the same issue when built other libraries. Just install zlib1g-dev
solved my problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With