We detected these problematic arguments: * `INSTALL_opts` Did you misspecify an argument?

We detected these problematic arguments: * `INSTALL_opts`  Did you misspecify an argument?

目录

We detected these problematic arguments: * `INSTALL_opts`  Did you misspecify an argument?

问题:

 解决:

#完整错误:


问题:

#install.packages('devtools')
#devtools::install_url('BINARY_URL'[, INSTALL_opts = c("--no-multiarch", "--no-test-load")])


#install.packages('devtools')
#devtools::install_url('https://github.com/catboost/catboost/releases/download/v0.16.5/catboost-R-Windows-0.16.5.tgz', INSTALL_opts = c("--no-multiarch", "--no-test-load"))

install.packages('devtools')
devtools::install_url('https://github.com/catboost/catboost/releases/download/v1.0.0/catboost-R-Windows-1.0.0.tgz', INSTALL_opts = c("--no-multiarch", "--no-test-load"))


library(catboost)

 解决:

从catboost主页下载包到本地后安装;

# 
install.packages("D:\\Downloads\\catboost-R-Windows-1.0.0.tgz", repos = NULL, type = "source", INSTALL_opts = c("--no-multiarch", "--no-test-load"))

#
library(catboost)

#完整错误:

> install.packages('devtools')
trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/4.0/devtools_2.4.2.zip'
Content type 'application/zip' length 397109 bytes (387 KB)
downloaded 387 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\liguangdi\AppData\Local\Temp\RtmpohC1t1\downloaded_packages
> devtools::install_url('https://github.com/catboost/catboost/releases/download/v0.16.5/catboost-R-Windows-0.16.5.tgz', INSTALL_opts = c("--no-multiarch", "--no-test-load"))
WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
Downloading package from url: https://github.com/catboost/catboost/releases/download/v0.16.5/catboost-R-Windows-0.16.5.tgz
catboost/inst/libs/x64/libcatboostr.dll: truncated gzip input
tar.exe: Error exit delayed from previous errors.
Error: Failed to install 'unknown package' from URL:
  Does not appear to be an R package (no DESCRIPTION)
In addition: Warning messages:
1: In utils::untar(tarfile, ...) :
  ‘tar.exe -xf "C:\Users\LIGUAN~1\AppData\Local\Temp\RtmpohC1t1\file949852624.tgz" -C "C:/Users/LIGUAN~1/AppData/Local/Temp/RtmpohC1t1/remotes94984adefa1"’ returned error code 1
2: In system(cmd, intern = TRUE) :
  running command 'tar.exe -tf "C:\Users\LIGUAN~1\AppData\Local\Temp\RtmpohC1t1\file949852624.tgz"' had status 1
Warning message:
1 components of `...` were not used.

We detected these problematic arguments:
* `INSTALL_opts`

Did you misspecify an argument?


Thanks, I found a solution, First, download catboost pakage (tgz) then use the following code it worked. Perhaps it would be good to add this your instruction page. It may be helpful for others.

install.packages("D:/catboost-R-Windows-0.26.tgz", repos = NULL, type = "source", INSTALL_opts = c("--no-multiarch", "--no-test-load"))

参考:catboost

参考:CatBoost 1.0

猜你喜欢

转载自blog.csdn.net/zhongkeyuanchongqing/article/details/120896347