Skip to content

Instantly share code, notes, and snippets.

@mikelove mikelove/rmosek
Created Dec 29, 2017

What would you like to do?
How to install Rmosek
1) Download mosek from here:
(I downloaded this to my ~/bin)
cd ~/bin
tar -xvf mosektoolslinux64x86.tar.bz2
2) Add this to your ~/.bashrc
export PATH=$PATH:/home/username/bin/mosek/8/tools/platform/linux64x86/bin
3) Get academic license:
Check email, put licsense file in ~/mosek
4) Install:
export PKG_MOSEKHOME=/home/username/bin/mosek/8/tools/platform/linux64x86
export PKG_MOSEKLIB=mosek64
Then in R:
install.packages("Rmosek", type="source", INSTALL_opts="--no-multiarch", repos="")

This comment has been minimized.

Copy link

xuyiqing commented Jan 16, 2018

Really helped! Thank you so much.


This comment has been minimized.

Copy link

brendancooley commented Apr 18, 2019

Thank you!


This comment has been minimized.

Copy link

winteraspect commented Nov 5, 2019

In my case there is a version mismatch. In R it is expecting version 8 of mosek but I have installed the mosek 9.


This comment has been minimized.

Copy link

alexhallam commented Nov 9, 2019

I thought an updated would be useful here.

for reference, it is always good to check out the docs.

The path I used was


so in my .bashrc I have

export MSKHOME=/bin
export PATH=$PATH:$MSKHOME/mosek/9.1/tools/platform/linux64x86/bin

Verify that you can run the executable by typing mosek in the terminal. You should see:

MOSEK Version 9.1.6 (Build date: 2019-11-7 11:23:31)
Copyright (c) MOSEK ApS, Denmark. WWW:
Platform: Linux/64-X86

*** No input file specfied. No optimization is performed.

Return code - 0  [MSK_RES_OK]

at this point go into R.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.