On my VPS, when I type locale for a new user I get the following:
tarmac@vps48:~/log$ 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.ISO-8859-15
LANGUAGE=en_US:en
LC_CTYPE="en_US.ISO-8859-15"
LC_NUMERIC="en_US.ISO-8859-15"
LC_TIME="en_US.ISO-8859-15"
LC_COLLATE="en_US.ISO-8859-15"
LC_MONETARY="en_US.ISO-8859-15"
LC_MESSAGES="en_US.ISO-8859-15"
LC_PAPER="en_US.ISO-8859-15"
LC_NAME="en_US.ISO-8859-15"
LC_ADDRESS="en_US.ISO-8859-15"
LC_TELEPHONE="en_US.ISO-8859-15"
LC_MEASUREMENT="en_US.ISO-8859-15"
LC_IDENTIFICATION="en_US.ISO-8859-15"
LC_ALL=
This obviously isn't correct because it throws me all sorts of warnings. How do I fix this?
You can manually create the missing locale definitions:
sudo locale-gen en_US.ISO-8859-15
.Another option is to default to a different locale, for example
C.UTF-8
orPOSIX
which should exist. To try, in bash:export LC_ALL=POSIX
. If it works in an interactive session, you can add it to/etc/skel/.bashrc
from where it can be picked up to new user home directories byadduser
.I had to use
to fix this. The 'en' parameter was required and, to my surprise, other alternatives (such as en_GB or en_GB.UTF8) did not seem to work, whereas en did.