MATLAB 2008a installation problem on Ubuntu 8.04

October 7th, 2008 | Categories: Linux, matlab | Tags:

So..I finally get hold of a standalone copy of MATLAB 2008a and set about installing it on my Ubuntu laptop. I have installed MATLAB literally hundreds (if not thousands) of times so this is going to be easy. Right? Wrong!

I am using the installation DVD which is mounted at /media/cdrom0 so I type the following into the bash command prompt:


bash: /media/cdrom0/install: /bin/sh: bad interpreter: Permission denied

gah! OK, no problem – I’ve seen this before so I type

sh /media/cdrom0/install


    An error status was returned by the program 'xsetup',
    the X Window System version of 'install'. The following
    messages were written to standard error:

        /media/cdrom0/update/install/ 178:
                 /media/cdrom0/update/bin/glnx86/xsetup: Permission denied

    Attempt to fix the problem and try again. If X is not available
    or 'xsetup' cannot be made to work then try the terminal
    version of 'install' using the command:

            install* -t    or    INSTALL* -t


    Sorry! Setup aborted . . .

Permission denied? Ahh, I should have used sudo – silly me. After all, if I don’t then I am going to run into trouble eventually. So I try

sudo sh /media/cdrom0/install

Same result as before it seems. Let’s try the suggestion given by the install script and run the text only installer:

sudo sh /media/cdrom0/install* -t

I get asked if I want to agree to the license agreement before getting this error:

/media/cdrom0/update/install/ 582: /media/cdrom0/update/bin/glnx86/xsetup: Permission denied

Before I rolled my sleeves up and got my hands really dirty I did some googling. This link offers some advice – unmount and remount the DVD as follows:

sudo umount /media/cdrom0
sudo mount -o exec,suid /dev/scd0 /media/cdrom0

then run the installer again:

sudo sh /media/cdrom0/install

Success! Hope it worked for you too :)

  1. Ping
    December 3rd, 2008 at 21:51
    Reply | Quote | #1

    This is very helpful! Thanks!!!

  2. January 26th, 2009 at 22:36
    Reply | Quote | #2


    This seems to be a fairly widespread problem with UDF dvds with bad permissions:

  3. January 26th, 2009 at 22:50
    Reply | Quote | #3

    Actually nope; I still get the xsetup permission denied problem even with exec,suid. The only way to install was to copy the entire DVD locally and alter the permissions for install and xsetup. The copying had to be done as root since only root can even access the mounted filesystem.

    See also:

  4. July 11th, 2009 at 19:04
    Reply | Quote | #4

    Thanks, but I have something to add. Doing ‘sh script’ only will work if the file is a Bourne shell script. Doing ‘head -n1 script’ is enough to tell you. That trick of specifying the interpreter in the shell only gets around scripts with DOS (CR-LF) line endings (taking a CR on the end of the path), or a bad interpreter path (e.g. /usr/local/bin/perl when perl is in /usr/bin). I just came up with this problem with the TeX Live DVD, which has a Perl install script, and so I tried ‘perl script’ (I then smacked my forehead at the ‘exec’ option). Thanks again.

  5. Javier
    October 14th, 2011 at 13:31
    Reply | Quote | #5

    Thank you! you saved my life :D