首页 > 解决方案 > 无法安装最新版本的 gganimate 包,好像依赖项“transformr”不可用

问题描述

我正在使用最新的软件版本:

R 3.5.1、R 工作室 1.1.456、Rtools 3.5

我收到以下错误消息:

c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o transformr.dll tmp.def RcppExports.o align_rings.o sf_packing.o triangulate.o -LD:/R/R-35~1.1/bin/x64 -lR
installing to D:/R/R-3.5.1/library/transformr/libs/x64
** R
** byte-compile and prepare package for lazy loading
Warning: S3 methods '$.bbox', '$.crs', '$<-.sf', '[.sf', '[.sfc', '[<-.sfc', '[[<-.sf', 'st_agr<-.sf', 'st_crs<-.sf', 'st_crs<-.sfc', 'st_geometry<-.data.frame', 'st_geometry<-.sf', 'Ops.crs', 'Ops.sfc', 'Ops.sfg', 'Ops.sgbp', 'aggregate.sf', 'as.data.frame.sf', 'as.data.frame.sfc', 'as.data.frame.sgbp', 'as.matrix.sfg', 'as.matrix.sgbp', 'c.sfc', 'c.sfg', 'cbind.sf', 'dim.sgbp', 'format.sfc', 'format.sfg', 'head.sfg', 'identify.sf', 'identify.sfc', 'is.na.bbox', 'is.na.crs', 'merge.sf', 'plot.sf', 'plot.sfc_CIRCULARSTRING', 'plot.sfc_GEOMETRY', 'plot.sfc_GEOMETRYCOLLECTION', 'plot.sfc_LINESTRING', 'plot.sfc_MULTILINESTRING', 'plot.sfc_MULTIPOINT', 'plot.sfc_MULTIPOLYGON', 'plot.sfc_POINT', 'plot.sfc_POLYGON', 'plot.sfg', 'print.bbox', 'print.crs', 'print.sf', 'print.sf_layers', 'print.sfc', 'print.sfg', 'print.sgbp', 'rbind.sf', 'rep.sfc', 'st_agr.character', 'st_agr.default', 'st_agr.factor', 'st_agr.sf', 'st_as_binary.sfc', 'st_as_binary.sfg', 'st_as_grob.CIRCULARSTRING', 'st_as_grob.COMPOUN [... truncated]
Error in library.dynam(lib, package, package.lib) : 
  DLL 'sf' not found: maybe not installed for this architecture?
ERROR: lazy loading failed for package 'transformr'
* removing 'D:/R/R-3.5.1/library/transformr'
In R CMD INSTALL
Installation failed: Command failed (1)
"D:/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore  \
  --quiet CMD INSTALL  \
  "C:/Temp/RtmpeE3VDN/devtools22dc79ce1d1/thomasp85-gganimate-ef2e717"  \
  --library="D:/R/R-3.5.1/library" --install-tests 

ERROR: dependency 'transformr' is not available for package 'gganimate'
* removing 'D:/R/R-3.5.1/library/gganimate'
In R CMD INSTALL
Installation failed: Command failed (1)

你能给我一个解决方案吗?

标签: rgganimate

解决方案


我有同样的问题,我重新安装了 tranformR、Rtools 并将C:\Rtools\binC:\Rtools\mingw_64\bin添加到环境路径中。重新启动R并且它正在工作。(注意:- 确保 Rtools 安装在 C 中:)


推荐阅读