使用 docker 启动 postgres:15 的时候,报错:
popen failure: Cannot allocate memory initdb: error: The program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/15/bin/initdb"
具体不知道为什么,换成 postgres:15-bullseye
之后就可以使用了。
貌似是因为:
Maintainers of the postgres docker images have updated the underlying OS image layer
来源:https://stackoverflow.com/questions/76555305/postgres-container-failed-to-start-with-initdb-error-popen-failure-cannot-allo