現状
brewからpostgresをインストールしました。
エラーが出るので、postmaster.idを消そうとしたのですが、
ファイルがないみたいです。
rm -f data/postmaster.pid
をしても、効果がありませんでした。
やったこと
terminal
$brew install postgres
terminal
$psql --version psql (PostgreSQL) 14.1 $postgres --version postgres (PostgreSQL) 14.1
terminal
$psql psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: database "t" does not exist
terminal
$postgres -D /usr/local/var/postgres 2022-01-28 14:27:14.406 JST [94892] LOG: starting PostgreSQL 14.1 on aarch64-apple-darwin21.1.0, compiled by Apple clang version 13.0.0 (clang-1300.0.29.3), 64-bit 2022-01-28 14:27:14.408 JST [94892] LOG: could not bind IPv6 address "::1": Address already in use 2022-01-28 14:27:14.408 JST [94892] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-01-28 14:27:14.408 JST [94892] LOG: could not bind IPv4 address "127.0.0.1": Address already in use 2022-01-28 14:27:14.408 JST [94892] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2022-01-28 14:27:14.408 JST [94892] WARNING: could not create listen socket for "localhost" 2022-01-28 14:27:14.408 JST [94892] FATAL: could not create any TCP/IP sockets 2022-01-28 14:27:14.409 JST [94892] LOG: database system is shut down
terminal
$rm /usr/local/var/postgres/postmaster.pid rm: /usr/local/var/postgres/postmaster.pid: No such file or directory
terminal
$sudo lsof -i:5432 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME postgres 94724 t 7u IPv6 0xe42d991dab624b7 0t0 TCP localhost:postgresql (LISTEN) postgres 94724 t 8u IPv4 0xe42d991d7856c0f 0t0 TCP localhost:postgresql (LISTEN)
まだ回答がついていません
会員登録して回答してみよう