Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Cannot find -lz

📅 2019-Dec-30 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

Problem

This is a common linking error I get on Ubuntu systems:

$ /usr/bin/ld: cannot find -lz

Solution

Installing this library solves the problem:

$ sudo apt install zlib1g-dev

Tried with: Ubuntu 18.04