Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ZLIB_1.2.9 not found" Compiling RMS #2622

Closed
12Chao opened this issue Mar 4, 2024 · 1 comment
Closed

"ZLIB_1.2.9 not found" Compiling RMS #2622

12Chao opened this issue Mar 4, 2024 · 1 comment

Comments

@12Chao
Copy link

12Chao commented Mar 4, 2024

Bug Description

Got the `ZLIB_1.2.9' not found error when compiling RMS.
The command I ran was "julia -e 'using Pkg; Pkg.add("PyCall");Pkg.build("PyCall");Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator;'", it might be related to #2617.

[ Info: Installing matplotlib via the Conda matplotlib package...
[ Info: Running `conda install -y matplotlib` in root environment
Channels:
 - conda-forge
 - defaults
 - rmg
 - cantera
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /work/westgroup/chao/envs/rmg_env

  added / updated specs:
    - matplotlib


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    matplotlib-3.5.3           |   py37h89c1867_2           7 KB  conda-forge
    ------------------------------------------------------------
                                           Total:           7 KB

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2023.12.12~ --> conda-forge::ca-certificates-2024.2.2-hbcca054_0 
  certifi            pkgs/main/linux-64::certifi-2022.12.7~ --> conda-forge/noarch::certifi-2024.2.2-pyhd8ed1ab_0 
  matplotlib         pkgs/main::matplotlib-3.5.3-py37h06a4~ --> conda-forge::matplotlib-3.5.3-py37h89c1867_2 



Downloading and Extracting Packages:
                                                                                                                                                                        
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR: InitError: PyError (PyImport_ImportModule

The Python package matplotlib could not be imported by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.

PyCall is currently configured to use the Julia-specific Python distribution
installed by the Conda.jl package.  To install the matplotlib module, you can
use `pyimport_conda("matplotlib", PKG)`, where PKG is the Anaconda
package that contains the module matplotlib, or alternatively you can use the
Conda package directly (via `using Conda` followed by `Conda.add` etcetera).

Alternatively, if you want to use a different Python distribution on your
system, such as a system-wide Python (as opposed to the Julia-specific Python),
you can re-configure PyCall with that Python.   As explained in the PyCall
documentation, set ENV["PYTHON"] to the path/name of the python executable
you want to use, run Pkg.build("PyCall"), and re-launch Julia.

) <class 'ImportError'>
ImportError("/lib64/libz.so.1: version `ZLIB_1.2.9' not found (required by /work/westgroup/chao/envs/rmg_env/lib/python3.7/site-packages/matplotlib/../../.././libpng16.so.16)")
  File "/work/westgroup/chao/envs/rmg_env/lib/python3.7/site-packages/matplotlib/__init__.py", line 210, in <module>
    _check_versions()
  File "/work/westgroup/chao/envs/rmg_env/lib/python3.7/site-packages/matplotlib/__init__.py", line 195, in _check_versions
    from . import ft2font

Stacktrace:
  [1] pyimport(name::String)
    @ PyCall /work/westgroup/chao/envs/rmg_env/share/julia/packages/PyCall/1gn3u/src/PyCall.jl:558
  [2] pyimport_conda(modulename::String, condapkg::String, channel::String)
    @ PyCall /work/westgroup/chao/envs/rmg_env/share/julia/packages/PyCall/1gn3u/src/PyCall.jl:722
  [3] pyimport_conda
    @ /work/westgroup/chao/envs/rmg_env/share/julia/packages/PyCall/1gn3u/src/PyCall.jl:715 [inlined]
  [4] __init__()
    @ PyPlot /work/westgroup/chao/envs/rmg_env/share/julia/packages/PyPlot/2MlrT/src/init.jl:174
  [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1115
  [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1061
  [7] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1391
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1494
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1783
 [10] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
 [11] macro expansion
    @ ./loading.jl:1648 [inlined]
 [12] macro expansion
    @ ./lock.jl:267 [inlined]
 [13] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
during initialization of module PyPlot

caused by: PyError (PyImport_ImportModule

The Python package matplotlib could not be imported by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.

PyCall is currently configured to use the Julia-specific Python distribution
installed by the Conda.jl package.  To install the matplotlib module, you can
use `pyimport_conda("matplotlib", PKG)`, where PKG is the Anaconda
package that contains the module matplotlib, or alternatively you can use the
Conda package directly (via `using Conda` followed by `Conda.add` etcetera).

Alternatively, if you want to use a different Python distribution on your
system, such as a system-wide Python (as opposed to the Julia-specific Python),
you can re-configure PyCall with that Python.   As explained in the PyCall
documentation, set ENV["PYTHON"] to the path/name of the python executable
you want to use, run Pkg.build("PyCall"), and re-launch Julia.
) <class 'ImportError'>
ImportError("/lib64/libz.so.1: version `ZLIB_1.2.9' not found (required by /work/westgroup/chao/envs/rmg_env/lib/python3.7/site-packages/matplotlib/../../.././libpng16.
so.16)")
  File "/work/westgroup/chao/envs/rmg_env/lib/python3.7/site-packages/matplotlib/__init__.py", line 210, in <module>
    _check_versions()
  File "/work/westgroup/chao/envs/rmg_env/lib/python3.7/site-packages/matplotlib/__init__.py", line 195, in _check_versions
    from . import ft2font
Stacktrace:
  [1] pyimport(name::String)
    @ PyCall /work/westgroup/chao/envs/rmg_env/share/julia/packages/PyCall/1gn3u/src/PyCall.jl:558
  [2] pyimport_conda(modulename::String, condapkg::String, channel::String)
    @ PyCall /work/westgroup/chao/envs/rmg_env/share/julia/packages/PyCall/1gn3u/src/PyCall.jl:716
  [3] pyimport_conda
    @ /work/westgroup/chao/envs/rmg_env/share/julia/packages/PyCall/1gn3u/src/PyCall.jl:715 [inlined]
  [4] __init__()
    @ PyPlot /work/westgroup/chao/envs/rmg_env/share/julia/packages/PyPlot/2MlrT/src/init.jl:174
  [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1115
  [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1061
  [7] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1391
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1494
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1783
 [10] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
 [11] macro expansion
    @ ./loading.jl:1648 [inlined]
 [12] macro expansion
    @ ./lock.jl:267 [inlined]
 [13] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611

How To Reproduce

Follow the procedures on RMG website

Installation Information

Describe your installation method and system information.

  • OS (include version if known): CentOS Linux release 7.9.2009 (Core)
  • Installation method: from source with anaconda
  • RMG version information:
    • RMG-Py: 3.2.0-224-g0419c44f5
    • RMG-database: 3.2.0-5-gcfb4910cf
    • Anaconda: 24.1.2
    • ZLIB: 2.13
@12Chao
Copy link
Author

12Chao commented Mar 4, 2024

Solved by installing ZLIB 2.1.9 manually and add it to LD_LIBRARY_PATH by

wget https://zlib.net/fossils/zlib-1.2.9.tar.gz
tar -zxvf v1.2.9.tar.gz
cd zlib-1.2.9
./configure --prefix=$HOME/bin/zlib/
make
make install
export LD_LIBRARY_PATH="$HOME/bin/zlib/lib":$LD_LIBRARY_PATH

Then build RMS again.

@12Chao 12Chao closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant