Skip to content

docker image bruin:latest dependency error, missing libodbc.so.2 for pyodbc #1405

@byte-opps

Description

@byte-opps
[16:48:09] [burin.sql_server_versions] >>   File "/home/bruin/.local/share/uv/tools/ingestr/lib/python3.11/site-packages/sqlalchemy/connectors/pyodbc.py", line 43, in dbapi
[16:48:09] [burin.sql_server_versions] >>     return __import__("pyodbc")
[16:48:09] [burin.sql_server_versions] >>            ^^^^^^^^^^^^^^^^^^^^
[16:48:09] [burin.sql_server_versions] >> ImportError: libodbc.so.2: cannot open shared object file: No such file or directory
[16:48:11] Failed: burin.sql_server_versions (9.962s)

when trying to use a postgresql database.

From a quick google, I tried to use the below in CD/CI, but it wont install the packages as user bruin and can't use sudo and don't know root password. So can you add it to the image please? if its the correct thing to fix the issue.

...
image: ghcr.io/bruin-data/bruin:latest
  script:
    - apt update
    - apt install unixodbc
    - apt install libodbc2
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions