Comment 0 for bug 969462

Revision history for this message
Scott Moser (smoser) wrote :

For more information on locale in the cloud-images, see bug 859814.

If you install postgresql-9.1 with invalid LC_ALL, then postgres will not be running after install (which causes issues with things that depend on it).

Try:
$ LC_ALL=fr_FR.UTF-8 ssh ubuntu@$HOSTNAME
% locale
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
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8
% sudo apt-get install postgresql-9.1
...
After this operation, 11.6 MB of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = (unset),
 LC_ALL = "fr_FR.UTF-8",
 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
Selecting previously unselected package postgresql-9.1.
(Reading database ... 26213 files and directories currently installed.)
Unpacking postgresql-9.1 (from .../postgresql-9.1_9.1.3-2_i386.deb) ...
Setting up postgresql-9.1 (9.1.3-2) ...
Error: The locale requested by the environment is invalid.
Error: could not create default cluster. Please create it manually with

  pg_createcluster 9.1 main --start

or a similar command (see 'man pg_createcluster').
update-alternatives: using /usr/share/postgresql/9.1/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode.

There is no postgres service running at this point.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: postgresql-9.1 9.1.3-2
ProcVersionSignature: User Name 3.2.0-20.33-virtual 3.2.12
Uname: Linux 3.2.0-20-virtual i686
ApportVersion: 1.95-0ubuntu1
Architecture: i386
Date: Fri Mar 30 18:16:50 2012
Ec2AMI: ami-bdea34d4
Ec2AMIManifest: (unknown)
Ec2AvailabilityZone: us-east-1c
Ec2InstanceType: t1.micro
Ec2Kernel: aki-805ea7e9
Ec2Ramdisk: unavailable
ProcEnviron:
 TERM=xterm
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: postgresql-9.1
UpgradeStatus: No upgrade log present (probably fresh install)