只需在 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
有人可以说出解决错误的确切解决方案吗?
您的第三个解决方案几乎就在那里,请确保也运行sudo apt-get install postgresql-10
。