Inicio > Debian, Resolución problemas, Tutoriales > Instalar Matlab r2008b en Debian

Instalar Matlab r2008b en Debian

Sábado, 17 de abril de 2010 Dejar un comentario Ir a comentarios

Ya he hablado en un par de ocasiones (aquí y aquí) de Octave, una alternativa libre muy válida a Matlab, pero que aún no es compatible 100% con el segundo. He estado validando piezas de código Matlab con Octave hasta hace poco sin problemas, pero recientemente me he visto en la obligación de instalar Matlab porque Octave no me estaba retornando los resultados esperados en algunos experimentos. En esta entrada explico el proceso de instalación de Matlab en Debian Lenny, ya que hay algunas peculiaridades que hay que solventar para instalar el programa.

Para instalar el programa tenemos que crear primero el directorio donde este va a residir:

mkdir -p $HOME/programas/matlab

Según la documentación de la instalación bastaría con ejecutar desde esa misma ruta el ejecutable “install” que hay en el directorio raíz del cdrom, pero si lo intentamos seguramente os pasará igual que a mi:

~/programas/matlab$ sudo /media/cdrom/install
bash: /media/cdrom/install: /bin/sh: bad interpreter: Permiso denegado

Esto en mi caso ocurre porque en el fstab, por defecto, no se indica que el cdrom se monte con permisos de ejecución. Así que lo que tenemos que hacer es montar en este caso el cdrom con este tipo de permisos. Para ello primero lo desmontamos:

sudo umount /media/cdrom

Y después lo volvemos a montar

mount -t iso9660 -o exec /dev/cdrom /media/cdrom
mount: dispositivo de bloques /dev/sr0 está protegido contra escritura; se monta como sólo lectura

Si volvemos a lanzar el script de instalación es muy probable que os salga este error:

~/programas/matlab$ sudo /media/cdrom/install
-------------------------------------------------------------------

 An error status was returned by the program 'xsetup',
 the X Window System version of 'install'. The following
 messages were written to standard error:

 /media/cdrom0/update/bin/glnx86/xsetup: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory

 Attempt to fix the problem and try again. If X is not available
 or 'xsetup' cannot be made to work then try the terminal
 version of 'install' using the command:

 install* -t    or    INSTALL* -t

-------------------------------------------------------------------

 Sorry! Setup aborted . . .

Este mensaje nos está indicando que nos hace falta la librería libxp6. La instalamos con aptitude y listo. La próxima vez que ejecutemos el script no tendremos ningún problema.

Referencias:

I’ve already spoken in a couple of times (here and here) of Octave, an open and very valid alternative to Matlab, but that it isn’t 100% compatible yet. I’ve validated some Matlab pieces of code with Octave without problems, but recently I needed to install Matlab because Octave didn’t get the expected results in some experiments. In this post I explain how to install Matlab in Debian Lenny because of there are some particularities to solve in order to accomplish this task.

We need to create the folder where Matlab will be installed:

mkdir -p $HOME/programs/matlab

According to the Matlab documentation, to install the program we have to run the “install” script in the root path of the cdrom from the created folder. If we do this, we probably get the next error:

~/programas/matlab$ sudo /media/cdrom/install
bash: /media/cdrom/install: /bin/sh: bad interpreter: Permiso denegado

This occurs, at least in my case, because by default the fstab doesn’t mount the cdrom with execution privilegies. So we have to mount this device with this kind of privilegies. For this purpose we first umount it:

sudo umount /media/cdrom

And then we mount it again

mount -t iso9660 -o exec /dev/cdrom /media/cdrom
mount: dispositivo de bloques /dev/sr0 está protegido contra escritura; se monta como sólo lectura

If we run again the installation script we surely obtain the following error message:

~/programas/matlab$ sudo /media/cdrom/install
-------------------------------------------------------------------

 An error status was returned by the program 'xsetup',
 the X Window System version of 'install'. The following
 messages were written to standard error:

 /media/cdrom0/update/bin/glnx86/xsetup: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory

 Attempt to fix the problem and try again. If X is not available
 or 'xsetup' cannot be made to work then try the terminal
 version of 'install' using the command:

 install* -t    or    INSTALL* -t

-------------------------------------------------------------------

 Sorry! Setup aborted . . .

This message indicate us that we need the library libxp6. Intalling it with aptitude everything is done. The next time we run the installation script, it will execute correctly.

References:

GD Star Rating
loading...
Instalar Matlab r2008b en Debian, 5.0 out of 10 based on 1 rating
Share
  1. Sin comentarios aún.
  1. Sin trackbacks aún.