Created
December 29, 2017 00:44
-
-
Save mikelove/67ea44d5be5a053e599257fe357483dc to your computer and use it in GitHub Desktop.
How to install Rmosek
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
Thank you!
In my case there is a version mismatch. In R it is expecting version 8 of mosek but I have installed the mosek 9.
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()
I don't really have much bandwidth to debug here (just posted the gist in case others found it useful), but I do notice you are using Mosek tool for Linux distribution on a Windows machine. I wouldn't expect that to work:
/bin/mosek/9.1/tools/platform/linux64x86/bin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Really helped! Thank you so much.