Clear Filters
Clear Filters

MatLab is not running SPM12 on R2023b with M3 chip

61 views (last 30 days)
When I try running spm12 in matlab version R2023b with an M3 chip Mac, I get the following error message:
Error using spm_check_installation>check_basic
SPM uses a number of MEX files, which are compiled functions.
These need to be compiled for the various platforms on which SPM
is run. At the FIL, where SPM is developed, the number of
computer platforms is limited. It is therefore not possible to
release a version of SPM that will run on all computers. See
/Applications/spm12/src/Makefile and
http://en.wikibooks.org/wiki/SPM#Installation
for information about how to compile mex files for MACA64
in MATLAB 23.2.0.2485118 (R2023b) Update 6.
Error in spm_check_installation (line 28)
check_basic;
Error in spm (line 290)
spm_check_installation('basic');
I have tried using the developer version of SPM12 from github and have also edited some of the scripts to add maca64 (rather than maci64), but none of these changes seemed to work. I have also tried making the changes to terminal as suggested by this wiki (https://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Mac_OS_(Intel)#macOS_Catalina,_Big_Sur,_Monterey,_Ventura).
Any help would be greatly appreciated!
  3 Comments
Eloïse Gerardin
Eloïse Gerardin on 28 Mar 2024
I have also the same problem, did you find a solution?
Taryn Berman
Taryn Berman on 25 Apr 2024 at 16:59
Downloading the developer version worked for me: https://github.com/spm/spm
There is also more information here about what to do if you encounter problems: https://www.fil.ion.ucl.ac.uk/spm/docs/installation/#macos

Sign in to comment.

Answers (2)

akshatsood
akshatsood on 21 Jan 2024
I understand that you are encountering an error on running SPM12 on your system. From what I can understand, this issue is related to the Apple's Gatekeeper which is a security feature of the macOS operating system. It enforces code signing and verifies downloaded applications before allowing them to run, thereby preventing you from launching malicious software. The option to disable this security feature no longer appears for newer macOS versions.
Thus, to address the error, you can temporarily disable Gatekeeper in the terminal by executing the following command
>> sudo spctl --master-disable
Now, the Anywhere option should be available under the Allow apps downloaded from section of System Preferences > Security & Privacy > General. From here, you can access and change the settings to loosen or tighten Gatekeeper security.
It is recommended to undo the change and re-enable Gatekeeper once you have met your requirements. To re-enable Gatekeeper, you can do so with a simple terminal command.
>> sudo spctl --master-enable
The Anywhere option in System Preferences > Security & Privacy > General should now be unavailable, and only standard Gatekeeper settings will appear.
If you’re unsure about the current status of Gatekeeper and wish to double-check that the desired changes have occurred, you can do so with the following terminal command.
>> spctl --status
If the terminal output is "assesments enabled", then the Gatekeeper is enabled. Otherwise, "assesments disabled" points that Gatekeeper is disabled and necessary action needs to be taken.
I hope this helps.
  3 Comments
Taryn Berman
Taryn Berman on 25 Apr 2024 at 16:31
I have tried following the wiki, and I still wasn't able to get it to work.
Taryn Berman
Taryn Berman on 25 Apr 2024 at 16:35
@akshatsood Thank you for your detailed response. Do you think the issue is with downloading SPM onto my computer? As far as I know, I am able to successfully download SPM, I encounter the issue when trying to open/install it in Matlab. I tried disabling Gatekeeper and it did not appear to make a difference.

Sign in to comment.


Amir Dehsarvi
Amir Dehsarvi on 9 Apr 2024
Installing spm12 developers version worked on M2. Try that.

Categories

Find more on Mathematics and Optimization in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!