Activation still required after silent activation succeeded (MATLAB r2016b)

75 ビュー (過去 30 日間)
Giuseppe Maria D'Aucelli
Giuseppe Maria D'Aucelli 2017 年 2 月 24 日
回答済み: Artur Gesla 2022 年 6 月 1 日
I have recently performed a silent install of MATLAB r2016b on a remote computer that does not run any X server. I used the file installation key provided by Mathworks website.
The installation process ended just fine and, afterwards, I ran
activate_matlab.sh -propertiesFile activate.ini
Getting a "Silent activation succeeded" message. Everything looks just fine, however when I run
matlab -nodisplay
I just get this output:
---------------------------------------------------------------------------
Error: Activation cannot proceed. You may either:
1. Set an X11 display, and restart the activation process
2. Use the silent activation feature
3. Activate using the license center
---------------------------------------------------------------------------
as if the activation was not successful. My license is the Academic - Total Headcount. Where did I go wrong?
In my activation.ini file I specified the following directives:
isSilent=true
activateCommand=activateOffline
licenseFile=/full/path/to/license/file.lic
installLicenseFileDir=/full/path/to/license/install/folder
installLicenseFileName=license.lic
  3 件のコメント
Giuseppe Maria D'Aucelli
Giuseppe Maria D'Aucelli 2017 年 2 月 28 日
Thank you, I just did so.
Yotam
Yotam 2017 年 8 月 15 日
Hey, did you get a solution?

サインインしてコメントする。

回答 (2 件)

Douglas
Douglas 2018 年 3 月 22 日
Problem solved. I just had to put the generated license file (that with the name specified by installLicenseFileName=) inside a licenses directory at the matlab root dir /usr/local/MATLAB/R201Xa/, where X is the current version for matlab. I had also to create a licenses dir at the root folder because it was not available by default.
  3 件のコメント
Lizz Cooper
Lizz Cooper 2021 年 3 月 25 日
For years I have struggled to get MATLAB installed on a Linux VM using CLI (like I do for every linux third party application that I install I am scripting in bash for reproducibility) but MathWorks documentation for a silent installation is seriously lacking.
This post finally got me to a successful installation & activation via File Installation Key & License.lic through the Licenses Activation Center for a MATLAB Trial Installation.
Getting Started - steps to reproduce silent installation for Linux
  1. For R2021a silent install on Linux Ubuntu 20.04 LTS target host, your best bet is to install MATLAB on your local UNIX based host (I am using MacOS, you should NOT use localhost Windows OS as the installer creation will NOT be formatted properly for UNIX based target systems... Why MATLAB even lets you export a Linux installer on Windows is beyond me, their documentation team is demonstratively not paying attention to detail... (or example, the ./install & ./bin/install_unix will have incorrect permissions as described on MathWorks blog here).
  2. Proceed by starting the MacOS localhost MATLAB installation. You'll sign in with you MathWorks account, and then in the upper righthand corner click the drop down to Download without installing for offline use. From here select Linux and all your required MATLAB products. This will then start a local file installation on your MacOS (these steps for getting offline download are described here).
  3. Once the file is finished exporting (likely around ~1.5GB for base MATLAB), go ahead and zip the MathWorks directory and then transfer over to your target Linux host VM. You can use SFTP, alternatively I used rsync to transfere reliably:
rsync -aP ./MathWorks.zip root@TARGET_LINUX_HOST:/tmp/
SILENT INSTALLATION ON LINUX UBUNTU HOST:
  • SSH to your Linux host and prepare the silent installation. From the License Center you will need a license.lic file, copy that over to the linux host and save to /tmp/license.lic

Navigate to tmp & unzip unzip your MathWorks Linux installer generated on UNIX based local host (MacOS)

cd /tmp
mkdir /tmp/MATLAB
unzip -d /tmp/MATLAB ./MathWorks.zip

Navigate to extracted MATLAB linux installer and prepare your `installer_input.txt` file

cd /tmp/MATLAB/MathWorks/R2021a/
cp ./installer_input.txt ./installer_input.txt.bak
vim ./installer_input.txt

Add the following to your installer_input.txt (edit for your environment specifics):

```
destinationFolder=/usr/local/R2021a/ # <-- CHANGE YOUR VERSION!
fileInstallationKey=XXXXX-XXXX-XXXXXX # <-- FROM THE LICENSE CENTER
agreeToLicense=yes
outputFile=/tmp/mathworks_######.log
enableLNU=no
improveMATLAB=no
```

Launch the Linux Installer (pre-activation)

sudo ./install -inputFile ./installer_input.txt

You must activate MATLAB post installation (make sure you have your license.lic from MATHWORK Lincence Center!)

cd /usr/local/R2021a/
mkdir ./licenses
mv /tmp/license.lic /usr/local/R2021a/licenses/

Now create your activation configuration file

cd /usr/local/R2021a/bin/
touch ./activate.ini
vim /usr/local/R2021a/bin/activate.ini

Edit your activate.ini accordingly for Offline Installation

```
isSilent=true
activateCommand=activateOffline
licenseFile=/usr/local/R2021a/licenses/license.lic
```

Run the MATLAB activation script for your silent installation:

cd /usr/local/R2021a/bin/
sudo ./activate_matlab.sh -propertiesFile ./activate.ini

At this point, your MATLAB Linux silent installation *should* be working!

/usr/local/R2021a/bin/matlab
If this throws errors, something is wrong (or I missed a step in my instructions!)
JY Wei
JY Wei 2021 年 8 月 25 日
Thank you so much. I activated successfully in this way.

サインインしてコメントする。


Artur Gesla
Artur Gesla 2022 年 6 月 1 日
This answer is a blessing, thank you! Pity that matlab does not specify this procedure with ini file nowhere explicitly.

カテゴリ

Help Center および File ExchangeInstall Products についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by