Home > Ubuntu 6.06 > Installing PostgreSQL on Ubuntu 6.06 problems

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

Categories: Ubuntu 6.06
  1. ElectroStatic Toffee Wrapper
    January 22, 2007 at 1:36 pm

    This install problem was mentioned in http://www.sunfreeware.com/INSTALL.postgresql.html

    Anyways thanks for explaining this in real english.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: