Skip to content

Instantly share code, notes, and snippets.

@mikelove mikelove/rmosek
Created Dec 29, 2017

Embed
What would you like to do?
How to install Rmosek
1) Download mosek from here:
https://www.mosek.com/downloads/
(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:
https://www.mosek.com/products/academic-licenses/
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="http://download.mosek.com/R/8")
@xuyiqing

This comment has been minimized.

Copy link

xuyiqing commented Jan 16, 2018

Really helped! Thank you so much.

@brendancooley

This comment has been minimized.

Copy link

brendancooley commented Apr 18, 2019

Thank you!

@winteraspect

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.

@alexhallam

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. https://docs.mosek.com/9.1/install/installation.html

The path I used was

<MSKHOME>/mosek/9.1/tools/platform/linux64x86/bin

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: mosek.com
Platform: Linux/64-X86


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

Return code - 0  [MSK_RES_OK]

at this point go into R.

library("Rmosek")
mosek_attachbuilder("/bin/mosek/9.1/tools/platform/linux64x86/bin")
install.rmosek()
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.