在Ubuntu 12.04上安装Postgresql 9.2

前端之家收集整理的这篇文章主要介绍了在Ubuntu 12.04上安装Postgresql 9.2前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
对于安装 postgresql 9.2我遵循这个url: http://www.ubuntugeek.com/how-to-install-postgresql-9-2-on-ubuntu-server-using-ppa.html

但是在安装结束时输出如下:

Setting up postgresql-common (140~precise) ...
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Adding user postgres to group ssl-cert
Building Postgresql dictionaries from installed myspell/hunspell packages...
 * No Postgresql clusters exist; see "man pg_createcluster"
Setting up postgresql-9.2 (9.2.4-0ppa1~precise) ...
Error: The locale requested by the environment is invalid.
Error: could not create default cluster. Please create it manually with

  pg_createcluster 9.2 main --start

or a similar command (see 'man pg_createcluster').
update-alternatives: using /usr/share/postgresql/9.2/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode.
 * No Postgresql clusters exist; see "man pg_createcluster"
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

当我试图启动postgresql时,它会产生以下错误

sudo /etc/init.d/postgresql start
perl: warning: Setting locale Failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),LC_ALL = (unset),LC_MESSAGES = "en_IN.UTF-8",LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
 * No Postgresql clusters exist; see "man pg_createcluster"

如何解决这个问题?

您的系统区域设置被搞砸了.您的LC_MESSAGES设置为en_IN.UTF-8,但LANG设置为en_US.UTF-8,这是奇怪和不一致的.您是否在〜/ .bash_profile / etc / environment或某事中设置了LC_MESSAGES?

你真的应该dpkg-reconfigure语言环境.见how to select and generate locales in Ubuntu.

一旦你修改了你的区域设置,你可以使用pg_wrapper命令pg_createcluster 9.2 main –start来建立这个错误来建立这个集群.之后,启动服务将会起作用.

原文链接:https://www.f2er.com/ubuntu/347325.html

猜你在找的Ubuntu相关文章