I am a new academic user trying to set up CVX 2.2 with MOSEK 11 in MATLAB R2024a on Windows.
My MOSEK academic license is installed and works correctly (mosekdiag is successful). However, cvx_setup rightly indicates that I need a “MOSEK-enabled CVX Professional license” to proceed.
The problem is that the academic license application page (http://cvxr.com/academic/) is unreachable and shows an “Error establishing a database connection”. This seems to be a persistent server-side issue.
Is there any alternative way to obtain the cvx_license.dat file while the web form is down?
Following advice from a previous discussion, I completely removed my old CVX installation, cleared all related MATLAB paths, and downloaded a fresh version of CVX from the official source.
However, when I run cvx_setup in the new directory, the installation fails with an unexpected error. I have tried running MATLAB as an administrator, but the result is the same. The error message indicates that it cannot access the file cvx_license.p. I have checked the installation folder (D:\Program Files\Matlab\toolbox\cvx), and this file appears to be missing entirely.
Here is the complete output from the command window:
>> cvx_setup
---------------------------------------------------------------------------
CVX: Software for Disciplined Convex Programming (c)2014 CVX Research
Version 2.2, Build 9 (a0a77590) Tue Apr 23 19:28:09 2024
---------------------------------------------------------------------------
Installation info:
Path: D:\Program Files\Matlab\toolbox\cvx
MATLAB version: 24.1 (R2024a)
OS: Windows 10 amd64 version 10.0
Java version: 1.8.0_202
Verfying CVX directory contents:
No missing files.
Preferences:
Path: C:\Users\gthvl\AppData\Roaming\MathWorks\MATLAB\cvx_prefs.mat
UNEXPECTED ERROR: -------------------------------------------------
现在无法访问以前可访问的文件 "D:\Program Files\Matlab\toolbox\cvx\cvx_license.p"。
出错 cvx_version (第 309 行)
cvx_license( args{:} );
出错 cvx_setup (第 20 行)
cvx_version( '-install', varargin{:} );
-------------------------------------------------------------------
Please report this error to support, and include entire output of
CVX_SETUP in your support request.
I’m confused because the verification step reports “No missing files,” yet the crucial cvx_license.p file seems to be absent, causing the setup to fail. Could this be an issue with the installer package or something I’m overlooking?
My cvx_setup was repeatedly failing with a fatal error that it could not access the cvx_license.p file.
The solution was to run rehash toolboxcache before cvx_setup. After clearing the cache, the main CVX installation completed successfully.
However, the setup log still shows errors for the optional Gurobi and Mosek solver shims, apparently due to permissions issues from installing in the Program Files directory. The core toolbox is now working, but the installation is not perfectly clean.
Here is the complete command window output:
>> rehash toolboxcache
>> cvx_setup
---------------------------------------------------------------------------
CVX: Software for Disciplined Convex Programming (c)2014 CVX Research
Version 2.2, Build 9 (a0a77590) Tue Apr 23 19:28:09 2024
---------------------------------------------------------------------------
Installation info:
Path: D:\Program Files\Matlab\toolbox\cvx
MATLAB version: 24.1 (R2024a)
OS: Windows 10 amd64 version 10.0
Java version: 1.8.0_202
Verfying CVX directory contents:
No missing files.
Preferences:
Path: C:\Users\gthvl\AppData\Roaming\MathWorks\MATLAB\cvx_prefs.mat
---------------------------------------------------------------------------
Setting CVX paths...done.
Saving updated path...done.
Searching for solvers...5 shims found.
2 solvers initialized (* = default):
* SDPT3 4.0 {cvx}\sdpt3
SeDuMi 1.02, {cvx}\sedumi
3 solvers skipped:
GLPK
Could not find a GLPK installation.
D:\Program Files\Matlab\toolbox\cvx\shims\cvx_gurobi
unexpected error:
错误使用 feval
现在无法访问以前可访问的文件 "D:\Program
Files\Matlab\toolbox\cvx\shims\cvx_gurobi.p"。
出错 cvx_setup (第 84 行)
tsolv = feval( tsolv.sname, tsolv );
D:\Program Files\Matlab\toolbox\cvx\shims\cvx_mosek
unexpected error:
错误使用 feval
现在无法访问以前可访问的文件 "D:\Program
Files\Matlab\toolbox\cvx\shims\cvx_mosek.p"。
出错 cvx_setup (第 84 行)
tsolv = feval( tsolv.sname, tsolv );
Saving updated preferences...done.
Testing with a simple model...done!
---------------------------------------------------------------------------
To change the default solver, type "cvx_solver <solver_name>".
To save this change for future sessions, type "cvx_save_prefs".
Please consult the users' guide for more information.