Configure error: could not find the zlib library
I am trying to install lalsuite on ubuntu according to the instructions here:
Everything went smoothly until I ran
./00boot
./configure --prefix=${VIRTUAL_ENV}/opt/lalsuite --enable-swig-pythonAnd the error I get is:
configure: error: could not find the zlib libraryI 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 zlib1gAfter 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-configThen 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:
./00boot
./configure --prefix=${VIRTUAL_ENV}/opt/lalsuite --enable-swig-pythonSadly the same error appears.
Any help is appreciated.
1 Answer
You need to install -dev package for zlib1g - it is named zlib1g-dev:
sudo apt-get install zlib1g-devand it will install zlib.pc file for pkg-config along with zlib.h header.