Thread: A simple question: Why 'pg_ctl: command not found...' ?

A simple question: Why 'pg_ctl: command not found...' ?

From
BeginnerC
Date:
Hello everyone,
When I start to learn the 'pg_ctl',
the bash echo 'pg_ctl: command not found...' and then print 'Install package 'postgresql-server' to provide command 'pg_ctl'? [N/y]'
I am confused because I had already install the PostgreSQL correctly just follow the postgres Document,to prove that,I use the psql to connect to the postgres and execute some sql statements (Just like 'CREATE TABLE', 'SELECT' and 'INSERT'),and these statements executed successfully.
So how to solve this problem? Should I use the dnf to install the 'postgresql-server' or just add some path to the environment variable?
My system is Fedora 35 and the PostgreSQL version is 14.
Thanks in advance!

Re: A simple question: Why 'pg_ctl: command not found...' ?

From
Laurenz Albe
Date:
On Tue, 2022-03-08 at 17:44 +0800, BeginnerC wrote:
> When I start to learn the 'pg_ctl',
> the bash echo 'pg_ctl: command not found...' and then print 'Install package 'postgresql-server' to provide command
'pg_ctl'?[N/y]'
 
> I am confused because I had already install the PostgreSQL correctly just follow the postgres Document,
> to prove that,I use the psql to connect to the postgres and execute some sql statements
> (Just like 'CREATE TABLE', 'SELECT' and 'INSERT'),and these statements executed successfully.
> So how to solve this problem? Should I use the dnf to install the 'postgresql-server' or just add some path to
the environmentvariable?
 
> My system is Fedora 35 and the PostgreSQL version is 14.

Ignore the overly helpful prompt to install PostgreSQL packages from your Linux distribution.

Your only problem is that /usr/pgsql-14/bin is not in your PATH environment variable.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




Re: A simple question: Why 'pg_ctl: command not found...' ?

From
Adrian Klaver
Date:
On 3/8/22 01:44, BeginnerC wrote:
> Hello everyone,
> When I start to learn the 'pg_ctl',
> the bash echo 'pg_ctl: command not found...' and then print 'Install 
> package 'postgresql-server' to provide command 'pg_ctl'? [N/y]'
> I am confused because I had already install the PostgreSQL correctly 
> just follow the postgres Document,to prove that,I use the psql to 

What exactly did you install and from where?

What document section?

> connect to the postgres and execute some sql statements (Just like 
> 'CREATE TABLE', 'SELECT' and 'INSERT'),and these statements executed 
> successfully.
> So how to solve this problem? Should I use the dnf to install the 
> 'postgresql-server' or just add some path to the environment variable?
> My system is Fedora 35 and the PostgreSQL version is 14.
> Thanks in advance!


-- 
Adrian Klaver
adrian.klaver@aklaver.com