Oops! You were supposed to run the 'file' and 'ldd' commands before doing anything to see what they said! Never mind, my bad! Looks I didn't explain myself clearly. I meant for you to run the two commands first and see what output they gave you. I suspected you were running 32 bit executables on a 64 bit machine. The output of both of those commands would have confirmed this if it was the case!
And if it did turn out to be the problem, that was when you should have installed the two packages. But that's a moot point now because you said that you are running a 32 bit system, so it looks like I was completely wrong. Sorry about that!
So those packages aren't going to help at all... you'll probably want to uninstall both of them using sudo apt-get remove ia32-libs gcc-multilib. Perhaps followed up with sudo apt-get autoremove to remove any unused/orphaned packages that the two removed packages depended on (if there are any!).
That should get you back to where you were before.
Once you've removed those two packages, try running the 'file' and 'ldd' commands on /usr/bin/gcc and see what it says. It might yield some clue as to what's going on!
I'm not sure what to suggest.....Perhaps purge gcc and reinstall it?
sudo apt-get purge gcc && sudo apt-get install gcc
Actually, hold off on doing that for now. I'll take a look at my Kubuntu install and investigate what files are used by gcc....
Hmmmm.....Looking at my own 32 bit Kubuntu install (which should be similar to your mint setup), I get the same error that you posted when I use the file and ldd commands on /usr/bin/gcc.
However, I can see that /usr/bin/gcc is a symbolic link to /usr/bin/builder-cc, which in turn is a Perl script. (I found that out using the command ls -alh /usr/bin/gcc and ls -alh /usr/bin/builder-cc)
So that's why we saw the 'not a dynamic executable' error message, because gcc itself is not an executable file, it's a shortcut to a Perl script! Who knew?!
Taking a look at the Perl script /usr/bin/builder-cc using the less command (less /usr/bin/builder-cc), I can see it uses different environment variables to determine which version of gcc to use when gcc is called.
If you type the command ls -alh /usr/bin/gcc* it will show you all of the files in /usr/bin that start with gcc.
In my case, I have gcc (which we've already determined is a sym-link to the Perl script builder-cc ), gcc-4.6, gcc-4.7 and gcc.real. (I also have gccgo and gccgo-4.7, but these aren't relevant. These are part of the compiler for GNU implementation of Googles 'Go' programming language)
Anyway, analysing the gcc files:
In the results from the ls command, I can see that gcc.real is a symbolic link to /usr/bin/gcc-4.6, which is the actual executable for version 4.6 of the gcc compiler. And gcc-4.7 is the executable for version 4.7 of the gcc compiler.
So gcc-4.6 is the default version of gcc on my machine and I also have gcc-4.7.
The file command shows that /usr/bin/gcc-4.6 and /usr/bin/gcc-4.7 are both dynamically linked 32 bit builds of gcc. And the ldd command shows that both link with linux-gate.so.1, libc.so.6 and /lib/ld-linux.so.2
So, perhaps take a look at the gcc files that you have in /usr/bin and work out which ones are the actual gcc executables. Then try running the 'file' and 'ldd' commands on those to see what output is given before deciding what to do next!
Well, I've learnt something new! I always assumed that gcc was the gcc executable itself...Hmmm! Who knew?! Anyway yes, examine the gcc files that are in /usr/bin and identify which ones are the actual executables, then take a look at what information 'file' and 'ldd' give you!