Tuesday, December 3, 2019

macOS 10.15 (Catalina) MOSEK installation

MacOS 10.15 (Catalina) introduced stricter checks for unverified applications downloaded from the Internet. When you try to run MOSEK you may experience security exceptions such as:

"mosekopt.mexmaci64" cannot be opened because the developer cannot be verified. macOS cannot verify that this app is free from malware.

or:

"mosek" cannot be opened because the developer cannot be verified. macOS cannot verify that this app is free from malware.

or:

‘.../mosekopt.mexmaci64’:  dlopen(.../mosekopt.mexmaci64,6): no suitable image found. Did find:  mosekopt.mexmaci64:  code signature in (.../mosekopt.mexmaci64)  not valid for use in process using Library Validation:  library load disallowed by system policy.
or other errors of this kind.


Solution 1


Do not download the MOSEK package through a browser, use a command-line download tool such as curl instead:

curl https://download.mosek.com/stable/9.1.9/mosektoolsosx64x86.tar.bz2 -o mosektoolsosx64x86.tar.bz2

(replace 9.1.9 with the version you want to download). Continue with normal installation.


Solution 2


After you download the distribution remove the quarantine attribute from the downloaded file:

xattr -d com.apple.quarantine mosektoolsosx64x86.tar.bz2

Administrator permissions may be necessary. Continue with normal installation.

If you already unpacked the distribution remove the attribute recursively from the whole folder with MOSEK installation

xattr -dr com.apple.quarantine mosek

assuming you are in the folder which contains the unpacked mosek folder. Administrator permissions may be necessary.