SOHO : Small Office Home Office
Freeware - Opensource software tips, tricks, tweaks & fixes for managing, securing, improving the performance of SOHO Desktop, Laptop, Networks

Thursday, April 12, 2012

Unable to open env locale

In my ssh-log
/var/log/auth.log : I have the following error message

Unable to open env file: /etc/default/locale: No such file or directory

Edited on 19/December/2012

1. Create and edit file locale at  /etc/default
sudo nano /etc/default/locale
2.. Add this to the file (in this case we are adding US english)
LANG = en_US.utf8 
3. save and quit the editor

4. regenerate the locales
sudo locale-gen en_US.utf8
5. logout and login for the environment variables to be in effect

Solution for ubuntu
sudo update locale

if the error still persists then 
sudo apt-get install localepurge
sudo dpkg-reconfigure localepurge

check the out with command 

Solution for Deian
How to get rid of  locale/perl error messages?

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
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 
This is similar to the error explained above.

apt-get update
apt-get install locales
dpkg-reconfigure locales 

A window will popup, select en_US.UTF-8 as shown below:
Configuring locales choose en_us.UTF-8
Click on <OK>

Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
Reboot your system (changes to environment variables require system reboot)

No comments:

Post a Comment