0

I am getting the following errors when I execute some commands on Solaris 10.

couldn't set locale correctly

Output of locale command-

LANG=en_US
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

Does LC_ALL need to be set? I don't have root on this machine.. can I specify locale in my rc files?

4 Answers4

2

Locale settings are done via environment variables - you don't need to edit system files unless you want to change the defaults for every process on the system. The locale(5) and environ(5) man pages have more details on the various variables that affect locale settings.

locale -a will show the installed locales so you can make sure you've set it to one that's actually there.

alanc
  • 1,500
  • 9
  • 12
2

You can use localeadm to install additional locales.

HampusLi
  • 3,398
  • 15
  • 14
1

I suspect your Solaris installation is missing packages with locales. Try doing a full OS installation and then setting the locale.

automaciej
  • 426
  • 1
  • 6
  • 11
0

locale -a gives you the list of installed locales. I believe that list doesn't contain en_US entry, so try setting LANG to "C" as well, or override it with setting LC_ALL to "C"

poige
  • 9,171
  • 2
  • 24
  • 50