I had installed MATLAB 2017b in my Ubuntu 18.04 PC and am able to execute it as :
sudo /usr/local/MATLAB/R2017b/bin/matlab -desktop
I intend to install another version sometime in the future as well.
I'm trying to create a command style terminal launcher matlab2017b
(like how other applications like gedit
, for example, can be executed) as:
sudo cp /usr/local/MATLAB/R2017b/bin/matlab /usr/local/sbin/matlab2017b
which gives the error:
/usr/local/sbin/matlab2017b: 454: .: Can't open /usr/local/bin/util/arch.sh
Tried creating a bash alias too in ~/.bashrc
as:
alias matlab2017b='/usr/local/MATLAB/R2017b/bin/matlab'
It gives the same error as above too.
What is going wrong here? Shouldn't placing the executable in any of the paths inside $PATH be enough? And how to execute it in terminal by running just matlab2017b
?
sudo ln -sf /usr/local/MATLAB/R2017b/bin/matlab /usr/local/sbin/matlab2017b
? – muru Sep 19 '18 at 08:41