フィルターのクリア

"locale" system error

19 ビュー (過去 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 Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by