Quick notes on the process of installing the MOSEK optimiser.
Download & Unpack
Go to https://www.mosek.com/downloads/. Download the appropriate distribution, which for me was https://download.mosek.com/stable/10.2.12/mosektoolslinux64x86.tar.bz2.
Unpack the distribution under /opt/
.
sudo tar -C /opt -xjf mosektoolslinux64x86.tar.bz2
Update Path
You need to tell the operating system where to find the mosek
executable, so add to PATH
:
export PATH=/opt/mosek/10.2/tools/platform/linux64x86/bin/:$PATH
Test it.
mosek -v
MOSEK version 10.2.12
Return code - 0 [MSK_RES_OK]
License
Request an evaluation license. You should be emailed a link to a license page, which should contain some content like this:
#
# MOSEK Trial License (SN-ff604f7a-c0ef-4257-a909-47df6c9becde)
# https://www.mosek.com/products/license-agreement/
# 2025 Mosek ApS - All rights reserved
#
VENDOR MOSEKLM
FEATURE PTS MOSEKLM 11 03-feb-2025 uncounted VENDOR_STRING=-1*-1*-1*0 \
HOSTID=DEMO TS_OK SIGN="0D1A 97CA B90F 1560 1331 AE6B C3D2 \
903F 8C47 3DE7 2C1C 5980 56E5 2A48 F665 1915 63A7 E136 D673 \
A524 6409 4AD1 4465 1BCF 045B 7E08 026A C269 BBCA 839E" \
SIGN2="05CA ACCF 53DF A00C 012D 50A3 4E51 855E 290A 73AC C243 \
895F 398A 746A D2B9 102B 3D4E A2AC BB8C CFDD E958 3C2B 30F9 \
8A1B BB87 D9C3 0690 9B49 A9C3 E3F0"
FEATURE PTON MOSEKLM 11 03-feb-2025 uncounted \
VENDOR_STRING=-1*-1*-1*0 HOSTID=DEMO TS_OK SIGN="1F4B 9473 \
3ACD D56B 8DEF D652 21D6 354A D745 BF97 C834 43D8 D82F 0284 \
A89B 167B 8600 0891 C42E F817 1B5D EC99 F945 682D 391E 9C67 \
BF27 C1C4 C479 79D2" SIGN2="1749 DEB3 0063 D65A C317 94E4 83A7 \
8B91 DDCB 0601 4B5F 0299 F174 2D75 2077 054B B526 3562 9F02 \
A138 939E F5F5 94C7 82AC 11E3 DD65 3E1A 9AA1 44D3 40CF"
📢 The license file above is not valid.
Save that to a file called mosek.lic
. By default the license file should be located in a directory ~/mosek
(directly under your home directory). I prefer not to clutter my home directory, so instead I moved the license file to ~/.mosek.lic
, located directly in my home directory but hidden. Then set an environment variable so that MOSEK knows where to find it:
export MOSEKLM_LICENSE_FILE=$HOME/.mosek.lic
Test
To test mosek
I ran it on a simple quadratic optimisation example in OPF format.
mosek quadratic.opf
That should produce a solution file, quadratic.sol
.