Cvx installation error: Invalid Mex file

I tried to install cvx on my Mac. However, despite repeated attempts, I continued to get the error
of Invalid MEX file. Initially, it showed the file couldn’t be opened as it is not from a verified publisher. After changing settings, the problem continued to persist. Can anyone help me?

Error in cvxprob/eliminate (line 150)
            [ rows, cols ] = cvx_eliminate_mex( dbCA, 1, rsv, ineqs
Error in cvxprob/solve (line 18)
[ At, cones, sgn, Q, P, dualized ] = eliminate( prob, true,
    shim.dualize );
Error in cvx_end (line 88)
        solve( prob );
Error in cvx_setup (line 213)

See @Michal_Adamaszek’s answer at Installing CVX on Mac new with M1 chip .