CVX installation Issue in MAC M1

I have encountered problem of installing CVX in my matlab. My laptop is MAC with M1 chip. Please kindly help.

the CVX model and supporting data that caused the error: cvx-maca64.zip

a copy of any error messages that it produced:
CVX: Software for Disciplined Convex Programming (c)2014 CVX Research
Version 2.2, Build 1148 (62bfcca) Tue Jan 28 00:51:35 2020

Installation info:
Path: /Users/mzh/Desktop/Matlab stuff/cvx
MATLAB version: 9.14 (R2023a)
OS: Mac OS X x86_64 version 15.0.1
Java version: 1.8.0_202
Verfying CVX directory contents:
No missing files.
Preferences:
Path: /Users/mzh/Library/Application Support/MathWorks/MATLAB/cvx_prefs.mat

Setting CVX paths…done.
Saving updated path…done.
Searching for solvers…4 shims found.
2 solvers initialized (* = default):

  • SDPT3 4.0 {cvx}/sdpt3
    SeDuMi 1.3.4 {cvx}/sedumi
    2 solvers skipped:
    GLPK
    Could not find a GLPK installation.
    Mosek unknown
    Could not find a MOSEK MEX file.
    Saving updated preferences…done.
    Testing with a simple model…
    UNEXPECTED ERROR: -----------------------------------------------
    MEX 文件 ‘/Users/mzh/Desktop/Matlab
    stuff/cvx/lib/cvx_bcompress_mex.mexmaci64’ 无效:
    dlopen(/Users/mzh/Desktop/Matlab
    stuff/cvx/lib/cvx_bcompress_mex.mexmaci64, 0x0006):
    tried: ‘/Users/mzh/Desktop/Matlab
    stuff/cvx/lib/cvx_bcompress_mex.mexmaci64’ (code signature in

    ‘/Users/mzh/Desktop/Matlab
    stuff/cvx/lib/cvx_bcompress_mex.mexmaci64’ not valid for use in
    process: library load disallowed by system policy),
    ‘/System/Volumes/Preboot/Cryptexes/OS/Users/mzh/Desktop/Matlab
    stuff/cvx/lib/cvx_bcompress_mex.mexmaci64’ (no such file),
    ‘/Users/mzh/Desktop/Matlab
    stuff/cvx/lib/cvx_bcompress_mex.mexmaci64’ (code signature in

    ‘/Users/mzh/Desktop/Matlab
    stuff/cvx/lib/cvx_bcompress_mex.mexmaci64’
    not valid for use in process: library load disallowed by system
    policy)
    出错 cvx_bcompress (第 29 行)
    [ ndxs, scls ] = cvx_bcompress_mex( sparse( x ), mode, num_sorted
    );
    出错 cvx/bcompress (第 21 行)
    [ xR, xb ] = cvx_bcompress( xb, mode, nsrt );
    出错 cvx/svec (第 13 行)
    [ xR, y ] = bcompress( x );
    出错 cvx/norm (第 46 行)
    x = svec( x, p );
    出错 cvx_setup (第 212 行)
    minimize( norm(A*x-b,1) );
    出错 testcvx (第 1 行)
    cvx_setup

Please report this error to support, and include entire output of
CVX_SETUP in your support request.

the CVX version number and build number
the version number of Matlab that you are running
the name and version of the operating system you are using
CVX: Software for Disciplined Convex Programming (c)2014 CVX Research
Version 2.2, Build 1148 (62bfcca) Tue Jan 28 00:51:35 2020

Installation info:
Path: /Users/mzh/Desktop/Matlab stuff/cvx
MATLAB version: 9.14 (R2023a)
OS: Mac OS X x86_64 version 15.0.1
Java version: 1.8.0_202
Verfying CVX directory contents:
No missing files.
Preferences:
Path: /Users/mzh/Library/Application Support/MathWorks/MATLAB/cvx_prefs.mat

Thank you very much for the kindest support and look forward to hearing from you!

" library load disallowed by system policy" is a generic MacOS security error which means your OS has to be explicitly told that these libraries are safe and can be loaded. It is not specific to CVX and there are tons of online resources about it (also on this forum) with different approaches to this problem.

For instance macOS installation error - #4 by Michal_Adamaszek