"locale" system error
16 次查看(过去 30 天)
显示 更早的评论
I'm using a system with Ubuntu 10.4 and I'm able to open Matlab 2013b. However, when I try to open or run a m-file, I get the following error:
Caught "std::exception" Exception message is:
locale::facet::_S_create_c_locale name not valid
I tried to google the solution, and some people solve this problem by setting the LC_ALL setting of the locale package. However, this has been set and doesn't solve the problem. When I type locale in the terminal I see:
LANG=en_US.utf8
LANGUAGE=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8
And the available locales are (locale -a):
C
en_AG
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NG
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
POSIX
So that shouldn't be a problem. Does anyone have a guess how to solve it? The version of locale is 2.11.1. On a different machine we have Ubuntu 12.04 and locale version 2.15, and there we don't have this problem.
3 个评论
Dominik
2014-5-30
fixed it by settin /etc/defaults/locale to: LANG=en_GB.UTF-8 LC_CTYPE="en_GB.UTF-8" LC_MESSAGES=en_GB.UTF-8 LC_ALL="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_PAPER="en_GB.UTF-8" LC_NAME="en_GB.UTF-8" LC_ADDRESS="en_GB.UTF-8" LC_TELEPHONE="en_GB.UTF-8" LC_MEASUREMENT="en_GB.UTF-8" LC_IDENTIFICATION="en_GB.UTF-8"
and in the bash: . /etc/default/locale
Domanic
2014-5-30
This works for me!
Similarly, I found that simply adding
setenv LANG en_GB.utf-8
to my .cshrc file was also sufficient (after logging out and back in).
回答(1 个)
Domanic
2014-5-30
I've seen this on Matlab 2014a, too. A workaround is to run the command
setenv('LC_ALL','C')
after Matlab starts. The underlying issue seems to be with Java. I'll post again if I work it out.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!