安装postgresql 9.2
时,我按照这个链接的指示进行操作: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"
我该如何解决这个问题?
en_US.UTF-8
和en_IN.UTF-8
的区域数据。 - Craig Ringerlanguage-pack-en-base
,再重新安装PostgreSQL来解决了问题。它起作用了。再次感谢你准确地指出错误。 :) - Naresh J