fails to start after install if invalid locale is set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql-common (Ubuntu) |
Fix Released
|
Low
|
Martin Pitt |
Bug Description
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=
LC_NUMERIC=
LC_TIME=
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
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-
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-
There is no postgres service running at this point.
Related bugs:
* bug 859814: Locale issues with beta-1/2 cloud-images
* bug 1134036: [maas] Failure when using ssh with a locale that is not configured on the server
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: postgresql-9.1 9.1.3-2
ProcVersionSign
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)
Ec2Availability
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)
Status changed to 'Confirmed' because the bug affects multiple users.