How do I install gcc-4.3?
There is definitely no need to use gcc-4.3. Of course you always get the warning message during mex-files creating:
Warning: You are using gcc version "4.6.x.x)". The version currently supported with MEX is "4.3.4". For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release/
but this is a warning - the MEX function will still compile!!!
The only thing to change is new link on libc.so.6 library: (see http://morganbye.net/blog/2011/10/matlab-ubuntu-1110)
So for 64 bit: Remove old link
sudo rm /lib64/libc.so.6
(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" libc.so.6 to something like libc.so.6.backup first.)
Replace with new link
sudo ln -s /lib/x86_64-linux-gnu/libc-2.13.so /lib64/libc.so.6
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/libc.so.6
Replace with new link
sudo ln -s /lib/i386-linux-gnu/libc-2.13.so /lib/libc.so.6
Of course if this is a fresh Ubuntu install then you probably wont need the rm (remove) command.
1) Edit the sources.list file:
sudo gedit /etc/apt/sources.list
add this line:
deb http://mirror.pnl.gov/ubuntu/ hardy-updates main universe
a complete list of mirror sites are given here
Save and close the file
2) Logout the login
3) Open Synaptic. If you don't see the mirror.pnl.gov/ubuntu/
hardy-updates main universe
in the source-list on the left, click on Reload.
4) Choose mirror.pnl.gov/ubuntu/ hardy-updates main universe
from the left
column - this should show the list of packages.
5) Choose g77 from the list, mark for installation and apply. g77 is now installed and is ready to use.