"locale" system error

조회 수: 26 (최근 30일)
Jos
Jos 2014년 4월 24일
댓글: Domanic 2014년 5월 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
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
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
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.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by