install command on linux doesn't bring up installer - again

55 views (last 30 days)
I'm having the same problem that others have had (same summary) but the solution did not work.
I download the zip file. I unzip using:
unzip -X -K matlab_R2020a_glnxa64.zip -d matlab_2020a_installer
per this recommendation from Mathworks. Per the same recommendation, I sudu su, and then
sudo ./install
The install script has execute permissions. But what happens is that the install script does not appear to do anything - it just hangs. The terminal shows that I've hit the enter key, but no install script appears. Frustrating. Same result if I DON'T sudo su first, but then just sudo ./install.
I added the required /usr/local/MATLAB and /usr/local/MATLAB/R2022a and chmodded 777 them both. No luck.
But if I try to run install WITHOUT root privileges, the script runs but then fails later when it doesn't have permission to write files. I can start install either with ./install in the terminal, OR by double clicking on the icon in Nautilus (ubuntu's folder viewer). Same thing: I get the installer running but failure when it actually tries to write files.
I've installed about four versions of Matlab in ubuntu and Windows. The ubuntu install has never worked without issues. Not once. Would appreciate both an immediate answer and a more bomb-proof linux/ubuntu install. Thanks!
PS The above sounds a little snippy - sorry. Didn't mean for it to be so. In fairness, too, there are so many ways to install stuff in various versions of linux. My experience is that an awful lot of answers to linux questions start with "There are at least seven different ways." Then a way is given that is not relevant to your flavor of linux, involving the installation of four or five software packages, several reboots, and then the instructions finish with something like "Then all you have to do is sudo numpy, porcupine your yaml, and have your sysadmin refactor your code base". Then.... (wait for it) you get an "easy peasy!". </rant>
Seriously, I'd appreciate you help in getting the software up and running. The help I've received from the support staff has always been spot on and helpful.

Accepted Answer

Jim Bosley
Jim Bosley on 29 Aug 2022
My bad, Philip Wesley already answered this. Answer is here. In a terminal:
xhost +SI:localuser:root
Then
sudo ./install
  1 Comment
Jim Bosley
Jim Bosley on 29 Aug 2022
In fairness I remembered that there was an answer, but I thought it was in one of my email inboxes and couldn't find it.

Sign in to comment.

More Answers (1)

Rik
Rik on 28 Aug 2022
The 'solution' is to run the installer as normal user (no sudo) and make the current user the owner of the install directory with chown. That has always worked for me so far.
I personally view this strange workflow as a bug, as long as it isn't properly documented how you should do this.
  1 Comment
Jim Bosley
Jim Bosley on 29 Aug 2022
Rik, Thanks. So I had to chown both the installer directory and the /usr/local/MATLAB directory. Without that last change, the installer says "I can't write files into /usr/local/MATLAB. Not sure if the change is advisable, having this folder owned by user:user rather than root:root. Also, if one tics the symbolic link setup, writing to /usr/bin, then one gets the same message: "can't write to /usr/bin".
I'm wondering if the issue is related to the new install of Ubuntu 22.04 (the new install is why I'm reinstalling MATLAB). Not sure where the script "install" hangs when I invoke it using sudo.
If I understand the process, once matlab is installed I can delete the install directory.
Right now I'm having to edit a .desktop file and figure out symlinks.
But it works....! Thanks again

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!