SPM/Installation on Linux

Linux 32 bit is a supported platform up to SPM8. You might have to recompile SPM MEX files (*.mexglx) if those provided with the SPM distribution do not appear to be compatible with your system. The Troubleshooting section of the Linux 64 bit installation page might also contain some useful information.

SPM12
SPM12 is not officially supported on Linux 32 bit, as this platform is about to be phased out (see MATLAB Platform Roadmap). This means that precompiled MEX files (*.mexglx) are not included in the SPM distribution.

Installation
Download spm8.zip and its updates spm8_updates_rxxxx.zip in your home directory then type the following in a Terminal: cd /home/login unzip spm8.zip unzip -o spm8_updates_rxxxx.zip -d spm8 Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing addpath /home/login/spm8 in MATLAB's workspace.

Compilation
In a Terminal, from the src folder of your SPM8 installation, type: cd /home/login/spm8/src make distclean make && make install make toolbox-distclean make toolbox && make toolbox-install make external-distclean make external && make external-install

Installation
Download spm5.zip and its updated MEX files SPM5_Matlab7.1_LINUX32_MEX.zip in your home directory then type the following in a Terminal: cd /home/login unzip spm5.zip unzip -o SPM5_Matlab7.1_LINUX32_MEX.zip -d spm5 Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing addpath /home/login/spm5 in MATLAB's workspace.

Compilation
In a Terminal, from the src folder of your SPM5 installation, type: cd /home/login/spm5/src make distclean make && make install

Installation
Download spm2.tar.gz and its updated MEX files SPM2_LINUX32_MEX.tar.gz in your home directory then type the following in a Terminal: cd /home/login tar xvfz spm2.tar.gz tar xvfz SPM2_LINUX32_MEX.tar.gz -C spm2 Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing addpath /Users/login/spm2 in MATLAB's workspace.

Compilation
In a Terminal, type: cd /home/login/spm2 make Linux