MATLAB Answers

Can I install MATLAB in Bash on Ubuntu on Windows?

292 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.
  8 Comments
Caterina Brighi
Caterina Brighi on 15 Sep 2020
Hi, I am having troubles with the installation of Matlab R2020a on my Ubuntu 18.04 WSL2. I am trying to use the silent installation instructions, by populating the installer_inut.txt file with the output folder, activation key, etc... the command run, but no folder gets created in my output directory. Any advice on how to fix this?
Thanks

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
  2 Comments

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
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!

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

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.
  10 Comments
Pawel Kusmierek
Pawel Kusmierek on 4 Feb 2021
Actually, I think I found a way around it.
from Matlab on Windows use:
[status, cmdout] = system(['wsl ~/programbin/unixprogram ~/datadir/datafile');
much simpler than installing Matlab on Linux on WSL

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.

Tags

No tags entered yet.

Products

Community Treasure Hunt

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

Start Hunting!