Can't install the caret package in R (in my Linux machine)

我们两清 提交于 2019-12-05 06:21:52

I recently encountered the problem with nlopt as well. It was easily solved by installing nlopt-devel and its associated dependencies from YaST (or your preferred package manager).

yindalon

I was hoping to add a comment first. On Jan 28, 2015, there was an addition to the nloptr package in github that possibly broke the compilation. I used a workaround by installing from an older version with the command

install.packages("http://cran.r-project.org/src/contrib/Archive/nloptr/nloptr_1.0.0.tar.gz",
                 repos=NULL, type="source")

As mentioned in this R help forum:

http://r.789695.n4.nabble.com/can-t-install-rugarch-and-nloptr-packages-in-R-3-01-opensuse-linux-td4669649.html

add the line to the src/Makevars file

     mv .libs lib; \

between

     make install; \
     ls | grep -v ^include$$ | grep -v ^lib$$ | xargs rm -rf; \

This will remove the compilation error and you would be able to install nloptr package. I have tested this for nloptr_1.0.0.tar.gz .

I solve this issue by installing first "car" from synaptic (use filter with "cran-car"). And then I install "caret" with rstudio but I guess it will work also for R. Hope it helps, Regards

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!