MATLAB2014b and locale on Ubuntu

This week we were trying to make the new MATLAB R2014b package available on the managed Linux workstations. The new version persistently produced an error message about locales when run on my test machine. However it worked fine on another supposedly identical machine.
When we checked the locale settings on the test machine they were incorrect, which was unsurprising. However the confusing thing was how they had got that way. The usual config files on the test machine all had correct locale settings. We also found that manually correcting the locale on the problem machine setting the LC_ALL and LANG environment variables didn’t make the MATLAB error vanish, which was very surprising.
Eventually we discovered that the problem was a .pam_environment file in my home directory with some outdated locale settings in it. This file is read as part of the process of starting a new session on our managed workstations, and its contents affect the environment. Loading MATLAB appears to cause that file to be reread, overwriting any locale settings we had previously set.
So now we have a working MATLAB R2014b package (load the appropriate module to use it if you’re on a managed Linux workstation). And if you try it and get an error message about locale, check your home directory for .pam_environment .

This entry was posted in Software, technical. Bookmark the permalink.