MatLab with Ubuntu 11.10

Under the new Ubuntu release (11.10 Oneiric Ocelot), trying to run MatLab gets the following error

/opt/MATLAB/bin/util/ 605: /lib64/ not found

MatLab will still load, but will effectively be useless and can only be closed by killing the process. Furthermore, my previous trick of

sudo ln -s /lib64/x86_64-linux-gnu/ /lib64/

On closer inspection, the link exists in /lib64 however the file it actually points to (/lib64/x86_64-linux-gnu/ does not exist, thanks to the update it’s moved

For 64 bit:

Remove old link

sudo rm /lib64/

(Be careful when removing the old link. It is essential for Linux to boot. So if you reboot before replacing the link with the new version then it’ll be time to dig out a live disk. If you’re paranoid then you can copy cp the file to something like first.)

Replace with new link

sudo ln -s /lib/x86_64-linux-gnu/ /lib64/

For 32 bit:

(I have not tested this as I only run x64 systems, but from the comments I think it should work)

Remove old link (again be careful with this command)

sudo rm /lib32/

Replace with new link

sudo ln -s /lib/i386-linux-gnu/ /lib/

Of course if this is a fresh Ubuntu install then you probably wont need the rm (remove) command.