Installing PostgreSQL on Ubuntu 6.06 problems
If you were like me, trying to install PostgreSQL 8.1 on Ubuntu 6.06 through a hosted machine, then you could have encountered a problem like this.
When you try to do a “sudo apt-get install postgresql-8.1”, your installation might terminate with this message:
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_AU:en", LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). 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 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_COLLATE to default locale: No such file or directory
The solution:
Temporary
Set your current terminal’s LC_ALL environment variable to “C”, and execute the apt-get command again.
Code peep:
prompt> export LC_ALL=C
prompt> sudo apt-get install postgresql-8.1
Permanent
What happened was that the locale files were not generated during your Ubuntu setup. In order to set up the locale files, run the locale-gen command. Execute the apt-get command after you have set up your locale files properly.
Code peep:
prompt> sudo locale-gen en_US.UTF-8
prompt> sudo apt-get install postgresql-8.1
This install problem was mentioned in http://www.sunfreeware.com/INSTALL.postgresql.html
Anyways thanks for explaining this in real english.