Can I install MATLAB in Bash on Ubuntu on Windows?

조회 수: 116 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2016년 10월 24일
편집: Jestzer 2023년 3월 6일
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?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2018년 12월 5일
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.

추가 답변 (4개)

Winston Yu
Winston Yu 2018년 8월 17일
편집: Walter Roberson 2018년 8월 17일
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
execstack -c
execstack -s MATLAB
  댓글 수: 1
Winston Yu
Winston Yu 2018년 8월 17일
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'

댓글을 달려면 로그인하십시오.

Winston Yu
Winston Yu 2022년 5월 21일
Mathworks now have mpm package to installing Linux binary: matlab-dockerfile/ at main · mathworks-ref-arch/matlab-dockerfile · GitHub
So, on WSL2, run these steps
sudo apt-get install -y unzip
chmod +x mpm
./mpm install --release=R2018a --destination=/usr/local/MATLAB/R2018a MATLAB
Then MATLAB will be installed /usr/local/MATLAB/R2018a
Mahmod, you can't use /mnt/d to do any installation operation and also can't install MATLAB at /mnt/d, /mnt is Windows NTFS filesystem, can't be used as true Linux file system, you need to install the software somewhere else.

Jestzer 2023년 3월 6일
편집: Jestzer 2023년 3월 6일
For installation alone, you can use MATLAB Package Manager to do an installation with minimal fuss.
However, you'll probably still have issues launching MATLAB because you're probably missing plenty of libraries. To see which ones you're missing, run the MATLABWindow application until you no longer get any library errors and it launches. By default, MATLAB R2022b installs to /usr/local/MATLAB/R2022b and the MATLABWindow application is in /usr/local/MATLAB/R2022b/bin/glnxa64. Its name is literally MATLABWindow, so you can do ./MATLABWindow once you've cd'd into the folder. Obviously, you'll need to change folder I mentioned above if you're not using R2022b or installed it elsewhere.
This approach worked for me on WSL2 with Ubuntu and Debian. If you don't know which libraries to install, use this search page.

Winston Yu
Winston Yu 2022년 5월 22일
Mahmod :
Same as /mnt/d, /mnt/c is not a good place to install any WSL2 based software, it's NTFS also. you have to install the software not on /mnt and not use anything at /mnt during the installation.
I feel that your WSL2 installation is corrupted, the error message like:
mkdir: cannot create directory ‘/home/daren/.cache’: Permission denied
indicate that something wrong with your WSL2 installation
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 5월 23일
The default linux file system, ext4, is case-sensitive unless you specifically configure otherwise (Linux 5.2 and later.)
The default Windows filesystem, is case-insensitive unless you specifically enable case-sensitivity
This difference between expected case-sensitivity, but getting case-insensitivity, can cause problems. This is one reason not to install Linux on NTFS file systems.

댓글을 달려면 로그인하십시오.


Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기


아직 태그를 입력하지 않았습니다.


Community Treasure Hunt

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

Start Hunting!

Translated by