Getting Matlab v 7.04 to run on OS X Leopard. |
Now to the real contents of this article. If you have purchased a copy of the Mac OS X leopard developer preview, you might have noted that Matlab v. 7.04 dosen't run under OS X Leopard. Well... at least not on the developer preview release. I first tried to google the problem but without sucess. Then I decided to investigate the problem and fix it myself.
sh-3.1# cd ../.. Ok. So the problem seems to be that the file /usr/lib/libncurses.5.dylib could not be found. This is because the OS X leopard has a newer version of this library, nemly libncurses.5.4.dylib. A way to fix this could be to look closer at the matlab startup routine and backtrace the error. This would be the pretty way to solve the problem. The fast and ugly way to fix the problem is to just copy the libncurses.5.4.dylib file into a new file called libncursrs.5.dylib from the X11 shell. First we need to gain root access to your mac to be able to write in the /usr/lib folder. (the user account "root" is the supreme administrator account on UNIX/LINUX based systems) If you haven't allready done this, the procedure is as follows: Start up the X11 terminal console from within Applications/utilities. Type the following command: bash-3.1$ sudo passwd root Now specify your "normal" password that you use with your user account. (Your default OS X user has administrator privileges, and gives you permission to set the root password) Then your're able to specify a new password. It sould look like this: Now you can gain root acceess to your system. Only log in as root when it's really neccecasy. You can really screw stuff up when you're "the root". Finally we can start fixing Matlab. From within the shell type the following: Start by typing su to change the user to root. Then specify the root password: bash-3.1$ su Now change the path to /usr/lib: sh-3.1# cd ../../../.. Now copy libncurses.5.4.dylib to libncurses.5.dylib: That should be all. To test that we no longer get the error message, try to change the path to where Matlab is installed: Try to start matlab. This is done by typing "./matlab -nojvm": sh-3.1# ./matlab -nojvm Note that we get another error message than before. This is good. The error message comes because we try to launch Matlab from within the X11 terminal. Try to start matlab by clicking on the matlab icon in the matlab installation folder. Now matlab should start without problems. |