411 REFERENCE · Wikibooks
SPM/Installation on Linux
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
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.
SPM8
Installation
Download spm8.zip and its updates spm8_updates_rxxxx.zip in your home directory then type the following in a Terminal:
<nowiki>
cd /home/login
unzip spm8.zip
unzip -o spm8_updates_rxxxx.zip -d spm8
</nowiki>
Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing
<nowiki>
addpath /home/login/spm8
</nowiki>
in MATLAB's workspace.
Compilation
In a Terminal, from the src folder of your SPM8 installation, type:
<nowiki>
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
</nowiki>
SPM5
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:
<nowiki>
cd /home/login
unzip spm5.zip
unzip -o SPM5_Matlab7.1_LINUX32_MEX.zip -d spm5
</nowiki>
Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing
<nowiki>
addpath /home/login/spm5
</nowiki>
in MATLAB's workspace.
Compilation
In a Terminal, from the src folder of your SPM5 installation, type:
<nowiki>
cd /home/login/spm5/src
make distclean
make && make install
</nowiki>
SPM2
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:
<nowiki>
cd /home/login
tar xvfz spm2.tar.gz
tar xvfz SPM2_LINUX32_MEX.tar.gz -C spm2
</nowiki>
Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing
<nowiki>
addpath /Users/login/spm2
</nowiki>
in MATLAB's workspace.
Compilation
In a Terminal, type:
<nowiki>
cd /home/login/spm2
make Linux
</nowiki>