2

My Dropbox installation on my linode is failing with the error:

ValueError: unknown locale: UTF-8 

When I run :

locale 

I get the output:

locale: Cannot set LC_CTYPE 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=UTF-8 LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= 

So it seems that the LC_CTYPE and LC_ALL settings are incorrect. How do I fix them ? I have tried:

sudo update-locale LC_CTYPE=en_US.UTF-8 

output:

perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). 

Any idea how to fix this ?

EDIT: I have also tried this:

sudo dpkg-reconfigure locales 

output:

perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "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_ALL to default locale: No such file or directory Generating locales... en_AG.UTF-8... up-to-date en_AU.UTF-8... up-to-date en_BW.UTF-8... up-to-date en_CA.UTF-8... up-to-date en_DK.UTF-8... up-to-date en_GB.UTF-8... up-to-date en_HK.UTF-8... up-to-date en_IE.UTF-8... up-to-date en_IN.UTF-8... up-to-date en_NG.UTF-8... up-to-date en_NZ.UTF-8... up-to-date en_PH.UTF-8... up-to-date en_SG.UTF-8... up-to-date en_US.UTF-8... up-to-date en_ZA.UTF-8... up-to-date en_ZM.UTF-8... up-to-date en_ZW.UTF-8... up-to-date Generation complete. 

Doing the following seems to make it work. But I how can I make it permanent? I did:

export LANGUAGE=en_US.UTF-8 

2 Answers 2

2

The following worked for me on Ubuntu 14.04 (VPS @ Linode):

Edit /etc/environment and add the following line:

LC_ALL="en_US.UTF-8" 

Note: pay attention to the exact error. Ensure the language (in question) has been generated correctly and set: /etc/default/locale accordingly.

1

I tried this and it worked for me.

I added to the end of /etc/default/locale the following line:

LC_ALL="es_CL.UTF-8" 

To replicate the error try using perl: type perl in the command line and your error should appear (to quit perl press CTRL+C). Then change the file, logout (exit command) and then login again; now try typing perl and the error should be gone.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.