Nar*_*h J 10 postgresql ubuntu postgresql-9.2 ubuntu-12.04
为了安装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
Run Code Online (Sandbox Code Playgroud)
当我尝试启动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"
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
Dav*_*ynn 27
我尝试了所有可以找到的解决方案,但最后这篇文章对它进行了排序:
http://ubuntuforums.org/showthread.php?t=1720356
基本上,添加你想要的语言/ etc/environment.就我而言:
sudo nano /etc/environment
Run Code Online (Sandbox Code Playgroud)
然后将其添加到文件的末尾:
LC_ALL="en_US.utf-8"
Run Code Online (Sandbox Code Playgroud)
然后重启服务器
sudo reboot
Run Code Online (Sandbox Code Playgroud)
Cra*_*ger 19
您的系统区域设置配置搞砸了.你LC_MESSAGES被设置为en_IN.UTF-8但LANG设置en_US.UTF-8为奇怪且不一致.你LC_MESSAGES装入了什么~/.bash_profile,/etc/environment还是什么?
你真的应该dpkg-reconfigure locales.了解如何在Ubuntu中选择和生成语言环境.
修复语言环境设置后,可以使用错误建议的pg_wrapper命令pg_createcluster 9.2 main --start来创建集群.之后,启动服务将起作用.
| 归档时间: |
|
| 查看次数: |
22288 次 |
| 最近记录: |