1
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?

More than 1 year has passed since last update.

postgresDB initdbコマンド実行時「bash: initdb: コマンドが見つかりませんでした...」と出力される

Posted at

環境

Oracle Linux7.9
Postgres 11.15

# 事象
[postgres@OL79 ~]$ initdb -D /home/postgres/data --no-locale
bash: initdb: コマンドが見つかりませんでした...

英語なら"command not found"と出力される事象。

対策

インストールユーザ(postgresユーザ)で下記コマンドを実行してパスを通す

$PATH

または上記内容をpostgresユーザの.bash_profileに追記し、sourceコマンドで反映させる

[postgres@OL79 ~]$ vi ./.bash_profile
[postgres@OL79 ~]$ source ./.bash_profile

参考

・Linux入門 ~「パスを通す」とは~
https://qiita.com/Naggi-Goishi/items/2c49ea50602ea80bf015

1
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
1
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?