Ubuntu12.04安裝PostgreSQL9.1問題

来源:互联网 发布:三级分销数据库设计 编辑:程序博客网 时间:2024/05/17 00:19

今天在一臺已經安裝Ubuntu12.04的機器上安裝PostgreSQL9.1時,出現如下錯誤提示:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
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


初步看來是字符集問題,查看本機的字符集為zh_TW.UTF-8

通過搜索相關問題的處理,大致可以通過如下幾個步驟解決.

1. 改變語言集相關變量:

     export LANGUAGE=en_US.UTF-8
     export LANG=en_US.UTF-8
     export LC_ALL=en_US.UTF-8
     

2.編譯本地的文件列表:

     sudo locale-gen en_US.UTF-8

3.重新配置本地相關包:

     sudo dpkg-reconfigure locales

4.重新安裝PostgreSQL:

     sudo apt-get install postgresql

原创粉丝点击