'Matlab MCR in ubuntu Amazon ec2

After installing MCR on Ubuntu, I cant run my code. The following is the error that I get. I tried googling but cant solve the problem.

./run_HPC_Location_Replacer.sh /usr/local/MATLAB/MATLAB_Compiler_Runtime/v83

Setting up environment variables

LD_LIBRARY_PATH is .:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/bin/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/sys/os/glnxa64

An Error has occurred while trying to initialize the MCR.

The error is: Fatal error loading library /usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/bin/glnxa64/libmwmclbase.so Error: libXt.so.6: cannot open shared object file: No such file or directory
Error:mclmcr initialization failed



Solution 1:[1]

I run into the same problem on my EC2 instance, and seems like it is missing the package lixbt6.

The problem got fixed after I did sudo apt-get install libxt6

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1