devbox icon indicating copy to clipboard operation
devbox copied to clipboard

pg_config does not work in a devbox environment

Open ronflima opened this issue 9 months ago • 2 comments

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 avatar Mar 04 '25 22:03 ronflima