1

I am trying to use CVX in MATLAB, but when I run a my code, I get this error:

“mexschurfun.mexmaci64” cannot be opened because the developer cannot be verified.

I have already tried changing my Mac security to "Allow anyway" for the “mexschurfun.mexmaci64” file, but it still gives me the same error. Any ideas how to fix this?

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
Atd
  • 31
  • 4
  • Where did you get this MEX-file from? I presume you didn't build it yourself? If the MEX-file depends on some dynamic library, you will need to allow running that one as well. – Cris Luengo Jul 12 '20 at 23:27
  • 1
    I just downloaded CVX and installed it using the cvx_setup command and got this error: “mexschurfun.mexmaci64” cannot be opened because the developer cannot be verified. And then for the other error while running a cvx code. I have no idea what this MEX-files are. – Atd Jul 13 '20 at 17:30
  • You might want to try building the MEX-files yourself, if there's source code available. MEX-files are compiled functions in C or C++ or Fortran, that work like any normal MATLAB function. – Cris Luengo Jul 13 '20 at 17:37

2 Answers2

3

The following answer is taken directly from the cvx forum.

This is a problem of the Gatekeeper in macOS. Go to System Preferences/Security & Privacy and then check the option “Anywhere” in “Allow apps downloaded from”. Follow these instructions if this option is not yet visible.

ViktorStein
  • 103
  • 8
1

If you trust the source where you have downloaded FieldTrip, you can resolve these errors for all MEX-files at once by opening a terminal and typing

sudo xattr -r -d com.apple.quarantine LOCATION_OF_FIELDTRIP

sudo find LOCATION_OF_FIELDTRIP -name \*.mexmaci64 -exec spctl --add {} \;

where LOCATION_OF_FIELDTRIP is the place where you have unzipped FieldTrip. Following sudo you will have to give your administrator password.

The first command removes all FieldTrip files from quarantine, the second adds a Gatekeeper exception to all MEX-files.

Check the following link for more help: https://www.fieldtriptoolbox.org/faq/mexmaci64_cannot_be_opened_because_the_developer_cannot_be_verified/

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
Milad A
  • 11
  • 1