Automation
Automation

Troubleshooting: Installation or upgrade errors with PyEZ on Ubuntu /usr/bin/ld: cannot find -lz

by Juniper Employee on ‎09-17-2015 04:27 PM - edited on ‎09-11-2017 05:23 PM by Administrator Administrator (1,527 Views)

Symptoms

The PyEZ installation or upgrade errors out with the following (or something similar):

  

/usr/bin/ld: cannot find -lz

collect2: error: ld returned 1 exit status

 

Diagnosis

Even after installing all required packages, sometimes the installation still errors out with the above error message. This is due to the zlib1g-dev package not being installed. From limited testing, this is not something that you should experience every time you perform an install/upgrade on Ubuntu. Of the 3 systems installed over the last week, this happened only on 1, but it may be because it is older and had the package removed at one time. This is only required for installation. PyEZ does not rely on this library to run.

 

 

 

Solution

To install the PyEZ package, run the following command:

 

sudo apt-get install -y zlib1g-dev