From: Funny Guy on
Hi,
I'm trying to install 64 bit version of Matlab 2010a. The installer script fails to install the program with the following error message



Starting installer ...
-------------------------------------------------------------------

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

/home/aksharma/Desktop/MatlabR2010a-linux/update/bin/glnxa64/xsetup: error while loading shared libraries: /home/aksharma/Desktop/MatlabR2010a-linux/update/bin/glnxa64/libexpat.so.1: file too short

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 . . .




I tried text mode install however that failed too with the following message:
Starting installer ...
awk: cmd. line:2: BEGIN { found = 0; extra = 9; min = 24; default = 24 }
awk: cmd. line:2: ^ syntax error
awk: cmd. line:6: if (nrows < min) nrows = default
awk: cmd. line:6: ^ syntax error
awk: cmd. line:12: END { if (found == 0) print (default - extra) }
awk: cmd. line:12: ^ syntax error
awk: cmd. line:12: END { if (found == 0) print (default - extra) }
awk: cmd. line:12: ^ syntax error
awk: cmd. line:2: (FILENAME=- FNR=1) fatal: division by zero attempted in `%'
[: 582: -le: argument expected
/pathdetails/MatlabR2010a-linux/update/bin/glnxa64/xsetup: error while loading shared libraries: /home/aksharma/Desktop/MatlabR2010a-linux/update/bin/glnxa64/libexpat.so.1: file too short

Any ideas about how to get rid of this error ?
Thanks a lot.
From: Charles on
To add to the thread, I experienced the same error on an OpenSuse 11.2 install.

Looking through the tar it appears that './update/bin/glx86/libexpat.so' and './update/bin/glx86/libexpat.so.1' are both 0B files. This appears to be the source of the error.

No ideas yet on a solution.
From: Charles on
Ok I have the solution.

The problem is that the files in the tar are statically linked so they don't include absolute paths to shared libraries like libexpat and gcc. Additionally, there is no reason why mathworks would include those shared libraries.

1) Check to make sure that you have libexpat installed.
apt-get search libexpat

If not, install it.

2) Next locate libexpat.so.1 on your system. It should be found in /lib/libexpat.so.1
ls /lib/libexpat*

3) Remove the file in the update directory (swap glnx86 and glnxa64 as appropriate)
rm update/bin/glnx86/libexpat.so.1

4) Create symlink to shared library that you found in step 2
ln -s /lib/libexpat.so.1 update/bin/glnx86/libexpat.so.1

5) Repeat this process for libstdc++.so.6 The library should be in /usr/lib/gcc/i586-suse-linux/4.4/libstdc++.so (your path will include ubuntu something instead of suse)

6) Run the ./install file and everything should work fine.

Cheers!