我已经安装了 PostgreSQL 11,但是由于某种原因,当我psql在终端中输入时PostgreSQL version 12 is not installed出现错误
最近我卸载了一个PostgreSQL服务器,所以我觉得我做得不太好
我怎么能得到 psql 命令 exec 版本 11 而不是 12

Gry*_*ryu 17
我已经复制了你的案例,这是我解决它的方法:
如果要完全删除它,请使用sudo apt purge postgresql-12answering Yes:
????????????????????????????????????????????????????????????????????? Configuring postgresql-11 ??????????????????????????????????????????????????????????????????????
? ?
? Removing the PostgreSQL server package will leave existing database clusters intact, i.e. their configuration, data, and log directories will not be removed. On ?
? purging the package, the directories can optionally be removed. ?
? ?
? Remove PostgreSQL directories when package is purged? ?
? ?
? <Yes> <No> ?
? ?
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
Run Code Online (Sandbox Code Playgroud)
在这之后:
sudo psql --version
psql (PostgreSQL) 11.7 (Ubuntu 11.7-2.pgdg19.10+1)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4914 次 |
| 最近记录: |