Hi,
The last week I've spent lots of time debugging (and searching through) the forum for how to install matlab on ubuntu server VM (20.04.3 LTS (Focal Fossa).
Background
From what I can gather through various posts, the summary of what i need to do is
- Download matlab installer executable from a machine with internet access, run it and choose "Download without installing" and move the installer files to the server in question along with posting my servers MAC-address and activating a licence for it (basically follow what's in Download Products Without Installing - MATLAB & Simulink - MathWorks Nordic). For the record, i chose version 2021b.
- Copy the installer properties file (installer_input.txt) and add (amongst other things) my file installation key and the path to my licence file. as well. This is explained in (Install Noninteractively - MATLAB & Simulink - MathWorks Nordic). This guide is for windows but according to Colin Fraser (Staff) in How do I use the Silent Installer for MATLAB? - (mathworks.com)
I followed these steps and tried running the installer in the following ways (both as root and as my normal service account)
./install -fileInput input.txt
./install -mode silent -fileInput input.txt
./install -mode silent -fileInput ${PWD}/input.txt
With the following input.txt
fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
mode=silent # This was found on this forum so i tested it out.
licensePath=xxxxxxxxxxxxxxxxxx
destinationFolder=/usr/local/R2021
enableLNU=no # Tried both yes/no without success
lmgrFiles=yes # Tried both yes/no without success
Problems
As far as I know, I've done everything correct and as far as my understanding goes, multiple combinations of my attempts should have worked. Nevertheless I still ran into a few odd issues.
(Jan 24, 2022 16:08:56) HTTP request failed, retry # 1
(Jan 24, 2022 16:08:56) Request timed out.
(Jan 24, 2022 16:09:18) HTTP request failed, retry # 2
(Jan 24, 2022 16:09:18) Request timed out.
(Jan 24, 2022 16:09:42) HTTP request failed, retry # 3
(Jan 24, 2022 16:09:42) Request timed out.
(Jan 24, 2022 16:10:10) HTTP request failed, retry # 4
(Jan 24, 2022 16:10:10) Request timed out.
(Jan 24, 2022 16:10:10) HTTP request was timedout.
(Jan 24, 2022 16:10:10) Activation Service Reachable? false
2. After (debugging quite a bit to find out which URL(s) the installer is even trying to reach) having opened up firewall access just to make some progress on the installer. I'm instead greeted with the following message.
terminate called after throwing an instance of 'framework::window::DisplayError'
what(): No display available.
So at this point it appears the no gui, and no internet access installation method requires both a gui and internet access (1).
3. Of course this makes me suspicious as i refuse to believe that (1) is true. I then started changing input.txt to make some sanity tests. I for instance added.
destinationFolder=/tmp/foo.log
This option is even part of the installer_input.txt template so I figured if anything would work, it would be this. The log output kept going to /tmp/mathworks_<user>.log so basically this option doesn't appear to be read by the installer at all (and at this point, i suspect perhaps not the other ones either).
4. At this point I start questioning quite a lot so I started checking if the config file is even being used.
$ stat input.txt | grep Access | tail -n 1
Access: 2022-01-26 09:43:50.819147700 +0000
$ ./install -fileInput input.txt
terminate called after throwing an instance of 'framework::window::DisplayError'
what(): No display available.
$ stat input.txt | grep Access | tail -n 1
Access: 2022-01-26 09:43:50.819147700 +0000
I also ran
watch -n 0.1 'lsof >> accesses.log'
While the installer was running and there it doesn't look like it's ever reading any txt file. To examplify this, i tested the following
./install -fileInput derp.txt
all with the same outcome and no error messages that neither the flag nor the files exist.
In addition to this, I tried redownloading everything (to make sure nothing got corrupted) and running the installer in a docker container on a different machine with internet access for debugging purposes but it ended up with exactly the same result.
Summary
As you probably realize, I've spent a massive amount of time with this problem and I'm at this point completely stuck and don't see any way to make progress. I briefly looked through the install-script but to no avail.
Help is very much appreciated.
Kind regards,
Eric