Skip to content

[BUG] libcrypto.so error when running bundled Python #68175

@xsmile

Description

@xsmile

Description

When running the bundled Python distribution, an error appears mentioning that libcrypto.so can not be found.

Setup

  • onedir packaging
  • VM (KVM)

Steps to Reproduce the behavior

Run any command involving Salt.

PS C:\Program Files\Salt Project\Salt> .\salt-call --versions-report
Error processing line 1 of C:\Program Files\Salt Project\Salt\lib\site-packages\relenv.pth:

  Traceback (most recent call last):
    File "C:\Program Files\Salt Project\Salt\lib\site.py", line 195, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "C:\Program Files\Salt Project\Salt\lib\site-packages\relenv\runtime.py", line 1040, in bootstrap
      setup_openssl()
    File "C:\Program Files\Salt Project\Salt\lib\site-packages\relenv\runtime.py", line 862, in setup_openssl
      set_openssl_modules_dir(str(sys.RELENV / "lib" / "ossl-modules"))
    File "C:\Program Files\Salt Project\Salt\lib\site-packages\relenv\runtime.py", line 946, in set_openssl_modules_dir
      libcrypto = ctypes.CDLL(cryptopath)
    File "C:\Program Files\Salt Project\Salt\lib\ctypes\__init__.py", line 374, in __init__
      self._handle = _dlopen(self._name, mode)
  FileNotFoundError: Could not find module 'C:\Program Files\Salt Project\Salt\lib\libcrypto.so' (or one of its dependencies). Try using the full path with constructor syntax.

Remainder of file ignored
Salt Version:
          Salt: 3006.14

Python Version:
        Python: 3.10.17 (heads/main:9a0f3fa, Jul  2 2025, 22:14:50) [MSC v.1944 64 bit (AMD64)]

Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
  cryptography: 42.0.5
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: 4.0.7
     gitpython: 3.1.41
        Jinja2: 3.1.6
       libgit2: Not Installed
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 6.0.1
         PyZMQ: 25.0.2
        relenv: 0.19.4
         smmap: 4.0.0
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist:
        locale: utf-8
       machine: AMD64
       release: 2021
        system: Windows
       version: 2021 10.0.19044 SP0 Multiprocessor Free

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbroken, incorrect, or confusing behaviorneeds-triage

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions