只需在Ubuntu 18.04上安装Postgresql并出现PostgreSQL客户端错误
Warning: No existing local cluster is suitable as a default target.
Please see man pg_wrapper(1) how to specify one.
Error: You must install at least one postgresql-client-<version> package
我尝试了StackOverflow和其他论坛上的所有解决方案,但未成功解决错误
以下是我尝试过的解决方案
1. psql --cluster 10/apps [other arguments]
when I try the first solution it give me the error
Error: Invalid version 10 specified with --cluster
2. psql -p 5432
3. sudo apt-get install postgresql-client-10
when try the third solution it shows the following
postgresql-client-10 is already the newest version (10.5-0ubuntu0.18.04).
4. gedit ~/.bashrc
PATH=/usr/local/pgsql/bin:$PATH
export PATH
有人可以告诉您解决错误的确切解决方案吗。
答案 0 :(得分:0)
您的第3个解决方案就差不多了,请确保也运行sudo apt-get install postgresql-10
。