thioshp

Correct System Locale Configuration

Feb 7th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. SOLVED: Correct Locate Configuration
  2. OS: Linux
  3.  
  4. Problem: Getting messages similar to the following whenever you run an app, especially in a terminal
  5.  
  6. ###################################################################
  7. $ man schroot
  8. man: can't set the locale; make sure $LC_* and $LANG are correct
  9.  
  10. $ locale
  11. locale: Cannot set LC_CTYPE to default locale: No such file or directory
  12. locale: Cannot set LC_ALL to default locale: No such file or directory
  13.  
  14. $ perl -v
  15. perl: warning: Setting locale failed.
  16. perl: warning: Please check that your locale settings:
  17. LANGUAGE = "en_US:en",
  18. LC_ALL = (unset),
  19. LC_CTYPE = "UTF-8",
  20. LANG = "en_US.UTF-8"
  21. are supported and installed on your system.
  22. perl: warning: Falling back to the standard locale ("C").
  23. #############################################################
  24. SOLUTIONS:
  25. The Easy Way
  26. Install debconf (i.e. run apt-get update then apt-get install debconf, as root)
  27. Run dpkg-reconfigure locales as root
  28.  
  29. The Hard Way
  30. Edit /etc/locale.gen as root. If /etc/locale.gen does not exist, create it. An example /etc/locale.gen is below.
  31. Run /usr/sbin/locale-gen as root
  32.  
  33. A sample /etc/locale.gen
  34. # This file lists locales that you wish to have built. You can find a list
  35. # of valid supported locales at /usr/share/i18n/SUPPORTED. Other
  36. # combinations are possible, but may not be well tested. If you change
  37. # this file, you need to rerun locale-gen.
  38. #
  39. # XXX GENERATED XXX
  40. #
  41. # NOTE!!! If you change this file by hand, and want to continue
  42. # maintaining manually, remove the above line. Otherwise, use the command
  43. # "dpkg-reconfigure locales" to manipulate this file. You can manually
  44. # change this file without affecting the use of debconf, however, since it
  45. # does read in your changes.
  46.  
  47. en_US.UTF-8 UTF-8
Add Comment
Please, Sign In to add comment