Installing IDL for my Ubuntu

Recently I was forced to install some secret version of IDL on my Linux/Ubuntu 20.04 due to the death of a server which stored the IDL license I had relied on. I feel like I should record my steps as a memo just in case for future use when necessary.

The first task of all, was to find a newest possible version from online. I was trying to find IDL 8.7, which was the version I have been using, but there was just no luck. Instead I found the installer for IDL 8.4 here (pswrd e6xq). After the download was completed, I had to change its postfix to .tar.gz. Otherwise unzipping it malfunctioned.

I specifically created a new directory for this version of IDL by

mkdir /Software/IDL

where the zipped installer was placed. This step was followed by

cd /Software/IDL
tar -xvf idl84envi52sp1linux.x86_64.tar.gz

whereby a list of new folders were created along with a file named install.sh. Then I typed in

./install.sh

which showed me lengthy paragraphs regarding terms and agreement stuff, and asked for the selection of products for installation. The following is just a copy of the texts:

Do you accept all of the terms of the preceding license agreement? (y/n): y

----------------------------------------
IDL 8.4 & ENVI 5.2, SP1 Installer
----------------------------------------

Please enter the directory to install in

(e.g. "/usr/local/exelis ")

/home/mthui/Software/IDL/exelis

Please select the products for installation.
IDL? (y/n): y
ENVI? (y/n): n


Please select the optional features for installation.

IDL Help files? (y/n): y
DICOM Network Services? (y/n): n

---------------------
Installation Summary:
---------------------
IDL 8.4 & ENVI 5.2, SP1
Installation location: /Software/IDL/exelis
Login: mthui
Products:
IDL
IDL Help files
Platforms:
Linux - X86 (64-bit)

Install the above configuration? (y/n): y

Installation continuing...

Unpacking base1.tar.gz ...
Unpacking base2.tar.gz ...
Unpacking idl_demo.tar.gz ...
Unpacking maps_high.tar.gz ...
Unpacking idl_workbench.tar.gz ...
Unpacking bin.linux.x86_64.tar.gz ...
Unpacking idl_help.tar.gz ...

Do you want to run the License Wizard? (y/n): y
rmdir: failed to remove 'install': No such file or directory

----------------------
Installation Complete:
----------------------
Setup files exist in the installation to run the product.
Have users set up their accounts as shown below:

Have your C-shell users add the following line to their .cshrc files:
source /Software/IDL/exelis/idl84/bin/idl_setup

Have your Korn shell users add the following line to their .profile files:
. /Software/IDL/exelis/idl84/bin/idl_setup.ksh

Have your Bash shell users add the following line to their .bashrc files:
. /Software/IDL/exelis/idl84/bin/idl_setup.bash

The installation has successfully been completed.

The reason why the rmdir line appeared was probably due to the fact that I have the environment variable $IDL_DIR pointing to the directory where my other IDL was installed. But anyway, it does not really matter, as the ‘install’ directory can be removed manually once the installation is truly completed.

The following steps are sort of messy and I do not even know exactly how I finally managed to install the license correctly. Initially, after modifying the hostname in the license.dat file to the hostname of my computer via

hostname

and creating a symbolic link to /Software/IDL/exelis/license, I typed in

cd exelis/idl84/bin/bin.linux.x86_64
./lmgrd -c /Software/IDL/exelis/license/license.dat

What awaited me was the following error message:

bash: ./lmgrd: No such file or directory

I googled online and found the following workaround (I cannot remember the link to the source but it is definitely Google-able.

sudo add-apt-repository ppa:zeehio/libxp
sudo apt-get update
sudo apt-get install libxp6
sudo apt-get install lsb-core

I then tried the ‘./lmgrd’ line once again. Although the previous error was gone, a new one popped out:

(lmgrd) Can't make directory /usr/tmp/.flexlm, errno: 2(No such file or directory)

I then simply manually typed in

sudo mkdir /usr/tmp

and ran the ‘./lmgrd’ command one more time, rendering me some log outputs. I was unsure about if the installation was successful, and so I tried to fire up IDL by ./idl, but I was still confronted with messages clearly indicating that the installation of the license was not alright. Then, I tried the following

cd ..
./exelislicense

and the returned message was

	The License wizard has not been installed.  Please consult the
installation guide for instructions on installing the Program Files.

The next step I took was

./lmgrd_install

but this gave me

cp: cannot create regular file '/etc/init.d/sys5_idl_lmgrd': Permission denied
ln: failed to create symbolic link '/etc/rc2.d/S99sys5_idl_lmgrd': Permission denied
ln: failed to create symbolic link '/etc/rc3.d/S99sys5_idl_lmgrd': Permission denied
ln: failed to create symbolic link '/etc/rc4.d/S99sys5_idl_lmgrd': Permission denied
ln: failed to create symbolic link '/etc/rc5.d/S99sys5_idl_lmgrd': Permission denied
ln: failed to create symbolic link '/etc/rc0.d/K01sys5_idl_lmgrd': Permission denied

So I changed to

sudo ./lmgrd_install

which exited without showing me any message, so I supposed this indicated that the step has been executed successfully. I then went back to the folder bin.linux.x86_64 and tried the previous failed step

cd bin.linux.x86_64
./lmgrd -c /Software/IDL/exelis/license/license.dat

Strangely, I still had no success in installing the license. After examining the paths used in lmgrd, I found it was quite possible that my $IDL_DIR was the culprit. After trying

IDL_DIR=/Software/IDL/exelis/idl84

and made another attempt to install the license, I was then informed that the port has already used. I tried to kill the process manually but it did not really work. By fiddling around I then found the following way to proceed:

sudo ./lmdown -force

I had to run it a few more times before the error message was eventually replaced with a new one with no obvious error reported. I then tried both

./idl

and

./idlde

finding that the installation was authentically successful. To avoid manually reset the license for IDL every time after the startup, I followed this article to enable /etc/rc.local, and added the following to the file to control the MAC address before the line of exit 0 in the file.

ifconfig <network interface name> down
ifconfig <network interface name> hw ether <MAC address>
ifconfig <network interface name> up
Installing IDL for my Ubuntu