MATLAB Answers

Can I install MATLAB in Bash on Ubuntu on Windows?

265 views (last 30 days)
The Windows 10 Anniversary update (Windows 10 build 1607) has an option to install a Bash shell based on a minimal Ubuntu 14.04 environment. Can I install MATLAB in this environment?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 5 Dec 2018
Bash on Ubuntu on Windows is a minimal installation of Ubuntu and therefore lacks many of the libraries that MATLAB requires to install and run that would be present in a normal Ubuntu Linux installation. This configuration is not qualified for MATLAB.

  7 Comments

Show 4 older comments
Justin Ghetti
Justin Ghetti on 27 Jun 2018
Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin
Jiayi
Jiayi on 13 Sep 2019
This works for me. I am using Windows 10, WSL Ubuntu 18.04 and MATLAB R2016B

Sign in to comment.

More Answers (6)

Winston Yu
Winston Yu on 17 Aug 2018
Edited: Walter Roberson on 17 Aug 2018
There are several things need to be fixed for default ubuntu on Windows 10
1. update basic library (for R2018a, MATLAB use glibc 3.4.22)
sudo apt-get install libstdc++6
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
2. install display library like mesa library (assume you are using opengl)
apt-get install mesa-utils
3. install jdk
apt-get install default-jdk
4. install execstack
apt-get install execstack
5. As George Yammine suggest, clean ELF of blas and lapack library, at matlabroot/bin/glnxa64, run command:
execstack -c libmwblas.so
execstack -c libmwlapack.so
execstack -s MATLAB

  1 Comment

Winston Yu
Winston Yu on 17 Aug 2018
Of course, I assume you want to use graphical MATLAB, so you might want to install Xwindows software like Xming at your Windows 10 host, and in Ubuntu shell, set "export DISPLAY=localhost:0.0'

Sign in to comment.


Enrico Schulz
Enrico Schulz on 18 Sep 2017
Which library is exactly missing? It is very easy to add every needed library. There's lot of software that is actually runing, including graphical nautilus, synaptic, FSL etc. with xlaunch.
matlab -nodesktop -nodisplay -nojvm -nosplash Without the need for any graphical output I am running into the following error message: MATLAB: detail/MvmLocalBoundMethods.cpp:114: static void mvm::detail::MvmLocalBoundMethods::initMethods(bool): Assertion `Failed to open local mvm library: libmwblas.so: cannot enable executable stack as shared object requires: Invalid argument' failed. Aborted (core dumped)
Best wishes!

  2 Comments

kinger
kinger on 9 Oct 2017
The same error occurred on my computer. I checked the library under /usr/local/MATLAB/R2017a/bin/glnxa64/, libmwblas.so does exist. Maybe the error is caused by some other problem?
Philip Borghesani
Philip Borghesani on 3 Nov 2017
That error appears to be related to this missing feature: cannot enable executable stack as shared object requires. No missing library is causing the issue.

Sign in to comment.


Mufti Mahmud
Mufti Mahmud on 2 Oct 2017
Dear MathWorks Support Team,
as the installation goes on well without any problem, would it be possible to let us know the required libraries to run which we may try to install manually and use it from the Bash!
That would be great!
Many thanks!

  0 Comments

Sign in to comment.


alexandre obert
alexandre obert on 27 Oct 2017
The same error occurred when trying to implement Runtime through linux native programs - I've got ths error with freesurfer. I do not find any valuable solution by now...

  2 Comments

Kyle Perry
Kyle Perry on 2 Nov 2017
Hi Alexandre,
If you are still having trouble with this issue please contact us so we can assist with the issue.

Sign in to comment.


Philip Borghesani
Philip Borghesani on 3 Nov 2017
I am curious Why would anyone want to do this? I can think of a few reasons, that I don't think are very good, but can think of no showstopper reason. I am not going to list my ideas here to avoid tainting the list.
What problem do you expect to solve or feature do you expect to gain by running Linux MATLAB on Windows instead of Windows MATLAB? Please post responses as comments to this answer.

  8 Comments

Show 5 older comments
Walter Roberson
Walter Roberson on 6 Nov 2017
indicates that some people have got freesurfer working on MS Windows (in the Linux layer.)
If I understand correctly, freesurfer itself is command line, so I think it is plausible it maybe be possible to use the MS Windows version of MATLAB with it, depending on the needs of the plug-in.
kkyaj
kkyaj on 16 Mar 2018
my reason: the provided source for my 2013a license is only available in 32bit on windows, but the linux version is 64bit.
neuromechanist
neuromechanist on 10 Jan 2019
Hi alexandre,
I quite agree with your point. But, just consider, if that is the case, why Microsoft gave the sideload option in the first place?
I am working w/ EEGLAB (a Matlab tool for Brain signal analysis). Unfrotuantely quite often, there are binary pacakges that should be run in shell, so there is a need to have a shell environment. Specifcally, one of the packages, NFT, has a shell module that only works in linux environment.
So, I basicaly have two options, ehtier go back and forth between OSes, or use this feature to do my job all at once.

Sign in to comment.


Francois
Francois on 9 Mar 2018
Is there any hope for having this working at some point?
The one thing I tried for getting rid of these errors is the following:
execstack -s glnxa64/libmwblas.so
execstack -s glnxa64/libmwlapack.so
But then the execution simply stops after displaying the message "MATLAB is selecting SOFTWARE OPENGL rendering", without any error.
This would be helpful for setting up some specific research software environments, that require combinations of many programs (MATLAB, SPM, FreeSurfer, ...) in Windows environments.

  0 Comments

Sign in to comment.

Tags

No tags entered yet.

Products