我在运行psql
命令然后vagrant up
命令后尝试运行vagrant ssh
命令
$ 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
`
我尝试了这些解决方案:
PostgreSQL command psql not found, trouble adding to $PATH
用locate psql
命令放置我自己的PATH
/usr/share/bash-completion/completions/psql
但仍未找到psql
任何帮助?
答案 0 :(得分:0)
您需要在VM上安装psql,为此您需要安装postgresql
和postgresql-contrib
个软件包,如下所示:
$ 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