Skip to content

[bug]: libz.so.1 shared object cannot be dlopen()ed #377

@daveppollard

Description

@daveppollard

Docker Hardened Image

dhi.io/debian-base:trixie-debian13-dev

Bug Description

Since the release of the latest image sha256:352337d438f58459d1058c1d418a6531dabe773e972d94db83f2478ea67babee, we receive the following error in our build pipelines:

ImportError: libz.so.1: shared object cannot be dlopen()ed

Unfortunately, I don't have access to retrieve the DHI images directly, but attached is a minimal github actions workflow to reproduce.

Steps to Reproduce

The following github workflow:

jobs:
  test:
    container:
      image: dhi.io/debian-base:trixie-debian13-dev
    steps:
    - name: Setup Python
      uses: actions/setup-python@v6
      with:
        python-version: "3.x"
    - name: Verify zlib
      shell: bash
      run: python -c "import zlib; print('zlib OK')"

raises the error output:

pip_system_certs: ERROR: could not register module: libz.so.1: shared object cannot be dlopen()ed
Traceback (most recent call last):
  File "/__w/_temp/45bfced9-895c-47f6-906f-c119b90fd044.py", line 1, in <module>
    import zlib
ImportError: libz.so.1: shared object cannot be dlopen()ed

Expected Behavior

No error to be raised.

Actual Behavior

pip_system_certs: ERROR: could not register module: libz.so.1: shared object cannot be dlopen()ed
Traceback (most recent call last):
  File "/__w/_temp/45bfced9-895c-47f6-906f-c119b90fd044.py", line 1, in <module>
    import zlib
ImportError: libz.so.1: shared object cannot be dlopen()ed

Environment

  • Github actions, running on a local Linux cluster

Relevant Logs

import zlib
  shell: python {0}
  env:
    pythonLocation: /__w/_tool/Python/3.14.4/x64
    PKG_CONFIG_PATH: /__w/_tool/Python/3.14.4/x64/lib/pkgconfig
    Python_ROOT_DIR: /__w/_tool/Python/3.14.4/x64
    Python2_ROOT_DIR: /__w/_tool/Python/3.14.4/x64
    Python3_ROOT_DIR: /__w/_tool/Python/3.14.4/x64
    LD_LIBRARY_PATH: /__w/_tool/Python/3.14.4/x64/lib
pip_system_certs: ERROR: could not register module: libz.so.1: shared object cannot be dlopen()ed
Traceback (most recent call last):
  File "/__w/_temp/45bfced9-895c-47f6-906f-c119b90fd044.py", line 1, in <module>
    import zlib
ImportError: libz.so.1: shared object cannot be dlopen()ed
Error: Process completed with exit code 1.

Additional Context

No response

Pre-submission Checklist

  • I have searched existing issues to ensure this bug hasn't been reported before
  • I have provided all the requested information above
  • I have tested this with the latest available version of the hardened image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageNeeds to be triaged

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions