I am trying to install lalsuite on ubuntu according to the instructions here:


Everything went smoothly until I ran

./configure --prefix=${VIRTUAL_ENV}/opt/lalsuite --enable-swig-python

And the error I get is:

configure: error: could not find the zlib library

I am doing all this inside a virtual environment using virtualenv. I'm fairly certain I have the zlib library as I installed it with:

$ sudo apt install zlib1g

After a thorough search for a solution I found someone with the same problem:


But I do not really understand their solution. My interpretation of their fix was to do the following:

First reinstall pkg-config:

sudo apt-get update
sudo apt-get install pkg-config

Then write the line suggested by the answer:

echo 'export PKG_CONFIG=/usr/bin/pkg-config' >> ~/.bashrc

(I am doing all this inside the virtualenv by the way).

Then restart everything and try the same thing again:

./configure --prefix=${VIRTUAL_ENV}/opt/lalsuite --enable-swig-python

Sadly the same error appears.

Any help is appreciated.

1 Answer 1


You need to install -dev package for zlib1g - it is named zlib1g-dev:

sudo apt-get install zlib1g-dev

and it will install zlib.pc file for pkg-config along with zlib.h header.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .