我正在尝试安装一些R软件包。不幸的是,这台机器无法访问互联网,所以我不得不脱机安装它们。
更具体地说,我正在尝试安装stringi
包(https://cran.r-project.org/web/packages/stringi/index.html)。以下是我要采取的步骤:
从https://cran.r-project.org/src/contrib/stringi_1.5.3.tar.gz下载包(从有互联网连接的机器)
库(工具) write_PACKAGES("./R_repo/") install.packages
安装实际上启动并通过了所有的检查。问题在于,作为进程的一部分,它在试图下载其他文件时中断。
更具体而言:
trying URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu61/data/icudt61l.zip'
Error in download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb"): cannot open URL
'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu61/data/icudt61l.zip'
trying URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu55/data/icudt61l.zip'
Error in download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb"): cannot open URL
'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu55/data/icudt61l.zip'
trying URL 'http://raw.githubusercontent.com/gagolews/stringi/master/src/icu61/data/icudt61l.zip'
Error in download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb"): cannot open URL
'http://raw.githubusercontent.com/gagolews/stringi/master/src/icu61/data/icudt61l.zip'
trying URL 'http://raw.githubusercontent.com/gagolews/stringi/master/src/icu55/data/icudt61l.zip'
Error in download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb"): cannot open URL
'http://raw.githubusercontent.com/gagolews/stringi/master/src/icu55/data/icudt61l.zip'
trying URL 'http://www.ibspan.waw.pl/~gagolews/stringi/icudt61l.zip'
Error in download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb"): cannot open URL
'http://www.ibspan.waw.pl/~gagolews/stringi/icudt61l.zip'
trying URL 'http://www.gagolewski.com/software/stringi/icudt61l.zip'
Error in download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb"): cannot open URL
'http://www.gagolewski.com/software/stringi/icudt61l.zip'
icudt download failed
Error: Stopping on error
是否有方法手动下载这些附加文件并将其保存在机器上,因此在安装过程中不需要在internet上获取它们?
谢谢你,马可
发布于 2020-10-29 15:17:16
你没有Rstudio吗?在顶部工具栏下,有一个tools
选项卡,如果您单击该下拉列表,您应该会得到一个install packages...
选项,在这里您可以浏览您的文件并找到您从USB驱动器下载并移动到PC上的.zip文件。如果您没有Rstudio,也可以下载.EXE和所需的包,这是值得的。
https://stackoverflow.com/questions/64593883
复制相似问题