【发布时间】:2021-12-30 19:10:50
【问题描述】:
我正在尝试在基于 linux 的 R 会话中下载一个包(我也有终端访问权限)。它需要特定的 C++ 依赖项,但我不知道如何安装它们。
由于我在一家公司的服务器后面,他们限制了我们对网络的访问。而且所有包都有一个工件,我必须指向它才能下载包。
例如:我已经能够以这种方式设置更改 repo 以从 CRAN 安装软件包(我已经掩盖了网站的 ***):
r <- getOption("repos")
r["CRAN"] <- "https://***.***.***/artifactory/r-project-cran/"
options(repos = r)
options(download.file.method = "curl")
options(download.file.extra = "--insecure")
但是现在我遇到了其中一个包所需的特定依赖项的问题。特别是“箭头”包。
例如,我去了:
install.packages("arrow", dependencies=TRUE,type="source")
Installing package into ‘/***/***/R’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://***.***.***/artifactory/list/cran-r/src/contrib:
Line starting '{ ...' is malformed!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4662k 100 4662k 0 0 5268k 0 --:--:-- --:--:-- --:--:-- 5262k
* installing *source* package ‘arrow’ ...
** package ‘arrow’ successfully unpacked and MD5 sums checked
** using staged installation
curl: (6) Could not resolve host: github.com
*** Proceeding without C++ dependencies
------------------------- NOTE ---------------------------
There was an issue preparing the Arrow C++ libraries.
See https://arrow.apache.org/docs/r/articles/install.html
---------------------------------------------------------
ERROR: configuration failed for package ‘arrow’
* removing ‘/***/***/R/arrow’
The downloaded source packages are in
‘/tmp/Rtmpu2u1d3/downloaded_packages’
- 有人知道我需要采取哪些具体步骤来解决此问题吗?
- 有没有办法改变curl命令并将其指向公司的神器为github?
- 或者,预先安装箭头 C++ 库?
【问题讨论】:
标签: r apache-arrow