ITADN

postgresql@18: libpq-oauth plugin not built — OAuth 2.0 device flow unavailable

#282024Closedvmax 创建于 2026-05-11
V
vmaxcommented
### `brew config` AND `brew doctor` output OR `brew gist-logs <formula>` link ```shell HOMEBREW_VERSION: 5.1.11-6-g65eea70 HOMEBREW_PREFIX: /opt/homebrew CPU: deca-core 64-bit arm_firestorm_icestorm Clang: 21.0.0 build 2100 macOS: 26.4.1-arm64 CLT: 26.4.1.0.1775747724 brew doctor: warnings only — none related to this issue. ``` ### Verification - [x] My `brew doctor` output says `Your system is ready to brew.` and am still able to reproduce my issue. - [x] I ran `brew update` and am still able to reproduce my issue. - [x] I have resolved all warnings from `brew doctor` and that did not fix my problem. - [x] I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates. - [x] My issue is not about a failure to build a formula from source. ### What were you trying to do (and why)? I was trying to use PostgreSQL 18's native OAuth 2.0 authentication (Device Authorization Grant, RFC 8628) to connect psql to a server that requires OAuth — specifically, an Authentik OIDC provider configured as the authentication backend for a PostgreSQL 18 instance. ### What happened (include all command output)? psql immediately fails with no OAuth plugin loaded: ``` $ psql "host=<server> user=<role> \ oauth_issuer=https://example.com/... \ oauth_client_id=<id>" psql: error: no OAuth flows are available ``` Investigating further: the plugin file is simply absent from the bottle: ``` $ ls $(brew --prefix)/lib/postgresql@18/libpq-oauth-18.dylib ls: .../lib/postgresql@18/libpq-oauth-18.dylib: No such file or directory ``` Confirmed by building from source with --with-libcurl: ``` $ ./configure --with-openssl --with-libcurl ... $ make -C src/interfaces/libpq-oauth # produces libpq-oauth-18.dylib — OAuth flow works correctly after placing # this file where libpq can find it ``` ### What did you expect to happen? psql should print a device authorization URL and wait for the user to authenticate in a browser — which is the expected behavior for the OAuth Device Authorization Grant flow that PostgreSQL 18 ships with. libpq-oauth-18.dylib should be present in the bottle and installed alongside the rest of postgresql@18. ### Step-by-step reproduction instructions (by running `brew` commands) ```shell brew install postgresql@18 # Confirm the plugin is missing: ls $(brew --prefix)/lib/postgresql@18/libpq-oauth-18.dylib # → No such file or directory # Confirm OAuth is compiled out: psql "host=<any-oauth-server> user=<role> oauth_issuer=https://example.com/ oauth_client_id=<id>" # → psql: error: no OAuth flows are available # Root cause — --with-libcurl is not passed to ./configure: brew cat postgresql@18 | grep libcurl # → (no output) ```
关闭于 2026-05-24 0 条评论