Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

I had to use

locale-gen en

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.

share|improve this answer

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 or POSIX 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 by adduser.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.