MATLAB: Does the installer give an error saying the directory jre does not exist on Linux

MATLAB

I downloaded the Linux installation files. When I execute the installer, I get the following error:
The directory /home/user/Downloads/matlab-linux/sys/java/jre/glnx86/jre does not exist.
OR
The directory /home/user/Downloads/matlab-linux/sys/java/jre/glnxa64/jre does not exist ERROR:
After checking, it appears that the other directory exists.
/home/user/Downloads/matlab-linux/sys/java/jre/glnxa64/jre
OR
/home/user/Downloads/matlab-linux/sys/java/jre/glnx86/jre
How do I run the installer successfully?

Best Answer

This error can occur if you download and try to run the 64 bit Linux installation files on a 32 bit Linux operating system, or if you attempt to run the 32 bit installation files on a 64 bit linux operating system. To check and see if the version of Linux is 32-bit or 64-bit, run the following command in a Terminal:
uname -a
If you see i386 or i686, this indicates you are on a 32-bit version of Linux. If you see ia64 or x86_64, then this is a 64-bit version of Linux.
It is possible to install the 32 bit version of MATLAB on 64 bit linux - please see the related solutions below for more information.