0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

(dockerエラー)postgres:12で「popen failure: Cannot allocate memory」

Last updated at Posted at 2025-07-12

はじめに

TIS社のハンズオンをやっているときに、dockerコンテナのPostgreSQL起動時にエラーが発生して作業が少し止まったので、エラー対処をここに載せておきます。

エラー内容

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/12/bin/initdb".
Check your installation.

エラー対処

docker-compose.dev.yml の中身の image: postgres:12image: postgres:12-bullseye に修正すれば、正常に起動しました。

% docker-compose -f docker/docker-compose.dev.yml ps   
      Name                     Command              State           Ports         
----------------------------------------------------------------------------------
docker_postgres_1   docker-entrypoint.sh postgres   Up      0.0.0.0:5432->5432/tcp

(参考)やっていたハンズオン

SPA + REST API構成のハンズオン

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?