Lpsolver not downloading, Rstudio

29 Views Asked by At

I am working with the 3.3.1 version of R studio and I am trying to download the package lpsolve but it is not working.

So far I have tried (many times)

When downloading in RStudio I kept getting an error saying

    Error: could not find function "lp"

When defining Lp as a function the long way from the link provided I got the error

   Error in .C("lpslink", direction = as.integer(direction), x.count 
    = as.integer(x.count),  : 
    "lpslink" not available for .C() for package "lpSolve"

Any help on figuring out how to either download lpsolve or fix the code for the lpsolve provided would be very greatly appreciated.

Thank you very much in advance for your time.

Edit: This was the exact output when I tried to download the package in RStudio

    Do you want to install from sources the package which needs 
    compilation?
    y/n: y
    installing the source package ‘lpSolve’

    trying URL 
   'https://cran.rstudio.com/src/contrib/lpSolve_5.6.15.tar.gz'
    Content type 'application/x-gzip' length 467646 bytes (456 KB)
    ==================================================
    downloaded 456 KB

    Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
    unknown timezone 'zone/tz/2020d.1.0/zoneinfo/America/New_York'
    * installing *source* package ‘lpSolve’ ...
    ** package ‘lpSolve’ successfully unpacked and MD5 sums checked
    ** libs
    xcrun: error: invalid active developer path 
    (/Library/Developer/CommandLineTools), missing xcrun at: 
    /Library/Developer/CommandLineTools/usr/bin/xcrun
    ERROR: compilation failed for package ‘lpSolve’
    * removing 


   ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/
   library/lpSolve’
   * restoring previous 
   ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/
  lpSolve’
  Warning in install.packages :
  installation of package ‘lpSolve’ had non-zero exit status

  The downloaded source packages are in
 
 ‘/private/var/folders/wx/rf42z3zx7d7ffk7zpcy49c6w0000gn/
 T/Rtmp5JGjqw/downloaded_packages’
0

There are 0 best solutions below