首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >R软件包rsvg安装中的问题

R软件包rsvg安装中的问题
EN

Stack Overflow用户
提问于 2022-10-28 06:01:21
回答 1查看 86关注 0票数 1

我试图安装R软件包rsvg,但没有成功。尝试了以下两种方法:

1install.packages("rsvg")

代码语言:javascript
运行
复制
install.packages("rsvg")

Installing package into ‘C:/Users/hp/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is
  later:
     binary source needs_compilation
rsvg  2.3.1  2.3.2              TRUE

installing the source package ‘rsvg’

trying URL 'https://cloud.r-project.org/src/contrib/rsvg_2.3.2.tar.gz'
Content type 'application/x-gzip' length 183798 bytes (179 KB)
downloaded 179 KB

* installing *source* package 'rsvg' ...
** package 'rsvg' successfully unpacked and MD5 sums checked
** using staged installation
** libs
rm -f rsvg.dll rsvg.o
"C:/PROGRA~1/R/R-42~1.1/bin/x64/Rscript.exe" "../tools/winlibs.R" 2.48.8
Error in download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip",  : 
  download from 'https://github.com/rwinlib/rsvg/archive/v2.48.8.zip' failed
In addition: Warning message:
In download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip",  :
  URL 'https://codeload.github.com/rwinlib/rsvg/zip/refs/tags/v2.48.8': Timeout of 60 seconds was reached
Execution halted
make: *** [Makevars.win:7: winlibs] Error 1
ERROR: compilation failed for package 'rsvg'
* removing 'C:/Users/hp/AppData/Local/R/win-library/4.2/rsvg'

The downloaded source packages are in
        ‘C:\Users\hp\AppData\Local\Temp\RtmpmG8xM2\downloaded_packages’
Warning message:
In install.packages("rsvg") :
  installation of package ‘rsvg’ had non-zero exit status

2remotes::install_github("ropensci/rsvg")

代码语言:javascript
运行
复制
library(remotes)
install_github("ropensci/rsvg")
Downloading GitHub repo ropensci/rsvg@HEAD
  
✔  checking for file 'C:\Users\hp\AppData\Local\Temp\RtmpmG8xM2\remotes5a645f9057ed\ropensci-rsvg-6d9840f/DESCRIPTION'     
─  preparing 'rsvg':
   checking DESCRIPTION meta-information ...
   checking DESCRIPTION meta-information ... 
✔  checking DESCRIPTION meta-information
─  cleaning src     
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories     
─  building 'rsvg_2.3.2.tar.gz'
  
Warning:
  
   Warning: file 'rsvg/cleanup' did not have execute permissions: corrected
   Warning: file 'rsvg/configure' did not have execute permissions: corrected

  
   

Installing package into ‘C:/Users/hp/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
* installing *source* package 'rsvg' ...
** using staged installation
** libs
rm -f rsvg.dll rsvg.o
"C:/PROGRA~1/R/R-42~1.1/bin/x64/Rscript.exe" "../tools/winlibs.R" 2.48.8
Error in download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip",  : 
  download from 'https://github.com/rwinlib/rsvg/archive/v2.48.8.zip' failed
In addition: Warning messages:
1: In download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip",  :
  downloaded length 35551249 != reported length 43111940
2: In download.file(sprintf("https://github.com/rwinlib/rsvg/archive/v%s.zip",  :
  URL 'https://codeload.github.com/rwinlib/rsvg/zip/refs/tags/v2.48.8': Timeout of 60 seconds was reached
Execution halted
make: *** [Makevars.win:7: winlibs] Error 1
ERROR: compilation failed for package 'rsvg'
* removing 'C:/Users/hp/AppData/Local/R/win-library/4.2/rsvg'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/hp/AppData/Local/Temp/RtmpmG8xM2/file5a645596780/rsvg_2.3.2.tar.gz’ had non-zero exit status

sessionInfo()

代码语言:javascript
运行
复制
sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] remotes_2.4.2

loaded via a namespace (and not attached):
 [1] processx_3.8.0    compiler_4.2.1    R6_2.5.1          rprojroot_2.0.3   cli_3.4.1         prettyunits_1.1.1 tools_4.2.1       withr_2.5.0      
 [9] curl_4.3.3        crayon_1.5.2      callr_3.7.2       ps_1.7.2          pkgbuild_1.3.1   
EN

回答 1

Stack Overflow用户

发布于 2022-10-28 06:39:23

在安装所需的winlib时,您似乎遇到了一些连接问题。您还可以尝试首先安装以下内容:remotes::install_github("rwinlib/rsvg")

编辑:与@Limey的评论相同的建议

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74231205

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档