PostgreSQL没有安装在Ubuntu 11.04上

在Ubuntu 11.04服务器的新副本上,我试图通过apt-get install postgresql安装Postgresql服务器.但是在安装日志的最后我看到:
Error: Could not create default cluster. Please create it manually with

  pg_createcluster 8.4 main --start

当我运行此命令时,我看到了这条消息:

perl: warning: Setting locale Failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",LC_ALL = (unset),LC_CTYPE = "UTF-8",LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Error: The locale requested by the environment is invalid.

没有Postgresql服务器启动:(

我需要做些什么才能对此感到高兴?

接受的答案对我没有帮助;如果还有像我这样的人,请阅读以下内容.

我将问题追溯到pg_upgradecluster,明确取消了LC_ALL.这使得Perl无论以何种方式使用其他环境变量都会失败.

所以我做的是我只是在/usr/bin/pg_upgradecluster中注释了第352行:

#delete $ENV{'LC_ALL'};

这样做了.当然,只有在所有群集中使用en_US.UTF-8的普通Joe并且不使用您需要保留的任何花哨编码时,这才有效.

相关文章

项目需要,有个数据需要导入,拿到手一开始以为是mysql,结果...
本文小编为大家详细介绍“怎么查看PostgreSQL数据库中所有表...
错误现象问题原因这是在远程连接时pg_hba.conf文件没有配置正...
因本地资源有限,在公共测试环境搭建了PGsql环境,从数据库本...
wamp 环境 这个提示就是说你的版本低于10了。 先打印ph...
psycopg2.OperationalError: SSL SYSCALL error: EOF detect...