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

pg_config does not work in a devbox environment #2549

Open
ronflima opened this issue Mar 4, 2025 · 1 comment
Open

pg_config does not work in a devbox environment #2549

ronflima opened this issue Mar 4, 2025 · 1 comment
Labels
bug Something isn't working triage Issue needs triage

Comments

@ronflima
Copy link

ronflima commented Mar 4, 2025

What happened?

After installing the devbox environment, I was unable to build psycopg2 Python driver because pg_config fails consistently. It happens for every single PostgreSQL installation I have tried.

Links look to be built correctly, but pg_config keeps failing consistently. It looks like the way devbox is building the PATH is not suitable for pg_config workings.

Steps to reproduce

  1. devbox init
  2. devbox add postgresql
  3. devbox add [email protected]
  4. devbox install
  5. devbox shell
  6. . ./.venv/bin/activate
  7. pip install psycopg2

Command

add

devbox.json

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.0/.schema/devbox.schema.json",
  "packages": [
    "postgresql@latest",
    "[email protected]"
  ],
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}

Devbox version

0.14.0

Nix version

nix (Nix) 2.24.7

What system does this bug occur on?

Linux (x86-64)

Debug logs

No response

@ronflima ronflima added bug Something isn't working triage Issue needs triage labels Mar 4, 2025
@ronflima
Copy link
Author

ronflima commented Mar 5, 2025

Workaround

There is a workaround for this. I had to install postgresql-client-common in my system, using the standard package manager in order to have psycopg2 correctly built. As my understanding, it shouldn't be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs triage
Development

No branches or pull requests

1 participant