CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Error "cannot find -lz" (

athlonshi September 19, 2010 10:53

Error "cannot find -lz"

I encountered compilation error when installing OpenFOAM 1.7.1 on my ubuntu 9.0.4
The error message was shown when entering the src/OpenFOAM folder, which is "cannnot find -lz"
This was also shown when compiling Scotch decomposition library

I am not sure what the z library is. I assumed it is zlib as I noticed that in my ThirdParty-1.7.1, there was not zlib-1.2.3 folder originally when unpacking the downloaded zip file. So, I manually installed z library. This solved other compilation errors when zlib.h was missing. However, the error due to "cannot find -lz" is still there.

Does anyone have suggestion? Thanks very much in advance!

athlonshi September 19, 2010 11:19

Problem solved after copy to /usr/local/lib

wyldckat September 19, 2010 15:59

Greetings Yu Shi,

The package you were missing for libz is this:

This will install both the library and the headers for it!

Best regards,

All times are GMT -4. The time now is 16:56.