0

I'm trying to run psql command after running vagrant up command then vagrant ssh command

$ vagrant ssh
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-75-generic i686)

0 packages can be updated.
0 updates are security updates

Last login: Sat Jun 17 02:55:00 2017 from 10.0.2.2

vagrant@vagrant:~$ psql
-bash: psql: command not found

`

I tried these solutions:

psql: command not found Mac

PostgreSQL command psql not found, trouble adding to $PATH

With locate psql command to put my own PATH

/usr/share/bash-completion/completions/psql 

But still psql not found

Any Help?

1 Answers1

0

You need to install psql on the VM, for this you need to install postgresql and postgresql-contrib packages as follow:

$ vagrant ssh
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-75-generic i686)

0 packages can be updated.
0 updates are security updates

Last login: Sat Jun 17 02:55:00 2017 from 10.0.2.2

vagrant@vagrant:~$ sudo apt-get update
vagrant@vagrant:~$ sudo apt-get install postgresql postgresql-contrib
Frederic Henri
  • 51,761
  • 10
  • 113
  • 139