Thread: where is postres installed?
After installing PostgreSQL on my Debian-12 machine, I typed 'postgres --version' and got this msg:
bash: postgres: command not found
'psql --version', however, does work and gives me this message :
psql (PostgreSQL) 16.3 (Debian 16.3-1.pgdg120+1)
Obviously postgres is not in the path, but I don't know where the 'apt-get' installed it or why it did not add it to the path.
Is there a way I can locate the installation directory?
Thank in advance.
ArbolOne.ca Using Fire Fox and Thunderbird. ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations. ArbolOne on Java Development is in progress [ í ]
You can try from the following commands:
After installing PostgreSQL on my Debian-12 machine, I typed 'postgres --version' and got this msg:
bash: postgres: command not found'psql --version', however, does work and gives me this message :
psql (PostgreSQL) 16.3 (Debian 16.3-1.pgdg120+1)
Obviously postgres is not in the path, but I don't know where the 'apt-get' installed it or why it did not add it to the path.
Is there a way I can locate the installation directory?
Thank in advance.--
ArbolOne.ca Using Fire Fox and Thunderbird. ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations. ArbolOne on Java Development is in progress [ í ]
/usr/local/pgsql/bin/pg_ctl
/usr/lib/postgresql/16/bin/pg_ctl
Hi Arbol,
You can try from the following commands:dpkg-query -L postgresql-16which psqlsudo find / -name "postgres" 2>/dev/nullOn Fri, 23 Aug 2024 at 05:35, Arbol One <ArbolOne@hotmail.ca> wrote:After installing PostgreSQL on my Debian-12 machine, I typed 'postgres --version' and got this msg:
bash: postgres: command not found'psql --version', however, does work and gives me this message :
psql (PostgreSQL) 16.3 (Debian 16.3-1.pgdg120+1)
Obviously postgres is not in the path, but I don't know where the 'apt-get' installed it or why it did not add it to the path.
Is there a way I can locate the installation directory?
Thank in advance.--
ArbolOne.ca Using Fire Fox and Thunderbird. ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations. ArbolOne on Java Development is in progress [ í ]
After installing PostgreSQL on my Debian-12 machine, I typed 'postgres --version' and got this msg:
bash: postgres: command not found'psql --version', however, does work and gives me this message :
psql (PostgreSQL) 16.3 (Debian 16.3-1.pgdg120+1)
Obviously postgres is not in the path, but I don't know where the 'apt-get' installed it or why it did not add it to the path.
Is there a way I can locate the installation directory?
dpkg-query -L postgresql-16
Regards
Kashif Zeeshan
Hi Arbol,Hope above response from Usman must have resolved your issue. You may also try by finding any binary of PostgreSQL. e.g.find /usr -name pg_ctl
/usr/local/pgsql/bin/pg_ctl
/usr/lib/postgresql/16/bin/pg_ctlRegards,IkramOn Fri, Aug 23, 2024 at 9:33 AM Muhammad Usman Khan <usman.k@bitnine.net> wrote:Hi Arbol,
You can try from the following commands:dpkg-query -L postgresql-16which psqlsudo find / -name "postgres" 2>/dev/nullOn Fri, 23 Aug 2024 at 05:35, Arbol One <ArbolOne@hotmail.ca> wrote:After installing PostgreSQL on my Debian-12 machine, I typed 'postgres --version' and got this msg:
bash: postgres: command not found'psql --version', however, does work and gives me this message :
psql (PostgreSQL) 16.3 (Debian 16.3-1.pgdg120+1)
Obviously postgres is not in the path, but I don't know where the 'apt-get' installed it or why it did not add it to the path.
Is there a way I can locate the installation directory?
Thank in advance.--
ArbolOne.ca Using Fire Fox and Thunderbird. ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations. ArbolOne on Java Development is in progress [ í ]--Muhammad Ikram