This page contains details of a discussion about Matlab cached from a forum. The problem typically looks like this

brahms-execute: /usr/local/matlab/sys/os/glnx86/ version `GCC_3.3' not found (required by /usr/lib/
brahms-execute: /usr/local/matlab/R2007a/sys/os/glnx86/ version `GLIBCXX_3.4.9' not found (required by brahms-execute)


Below, we summarise the solution to GregBug. This solution was originally retrieved from a Mathworks mailing list post at
MATLAB Central > comp.soft-sys.matlab > archive > problems with mexErrMsgTxt in R14
which was available here at time of writing.
So, you can most likely get away with something like this:

$ cd $MATLAB/sys/os/glnx86
$ mkdir old
$ mv libg2c.* libgcc_s.* libstdc++.* old

Now your linker should find the versions in /lib and /usr/lib.

If you're using a newer compiler that isn't installed with
--prefix=/usr, you should additionally copy the runtime libs
into sys/os/glnx86 so that MATLAB can find them. Most folks
won't need to do that.

Hope this helps

Another Possible Fix

Yeah, the cuter way of solving this is editing the .matlab7.rc
file in /$(PATH_TO_MATLAB)/bin/ (or creating a user level copy).
Just replace the LD_PREFIX='' with LD_PREFIX='/lib/:/usr/lib/'
to get Matlab to prefix the loader path it creates with the
system lib dirs and thus use the system version of the files in
preference to its own.

Same result, but less of a hack IMHO.