0

我正在尝试使用gganiminate库,但在调用 gganimate::gganimate(myplot) 时遇到问题。问题似乎出在依赖库magick上。

当我调用该函数时,我收到以下警告:

    gganimate::gganimate(p)

1: running command 'C:\WINDOWS\system32\cmd.exe /c convert --version' had status 4
2: In find_magic() : ImageMagick not installed yet!
 In im.convert(img.files, output = path.expand(movie.name),  ... :
  Please install ImageMagick first or put its bin path into the system PATH variable

所以我尝试单独安装magick。我在客户端的机器上,所以从 github 安装包需要我提供信息以通过防火墙。我已经使用相同的技术成功地在这台机器上安装了来自 github 的其他库。然而,magick 似乎遇到了其他问题。以下是我的代码和错误:

devtools::install_github("ropensci/magick",httr::set_config(httr::use_proxy("xx.xxx.xx.xx",xxxx)))

Downloading GitHub repo ropensci/magick@master
from URL https://api.github.com/repos/ropensci/magick/zipball/master
Installing magick
"C:/PROGRA~1/R/R-34~1.3/bin/x64/R"  \
  --no-site-file --no-environ --no-save  \
  --no-restore --quiet CMD INSTALL  \
  "C:/Users/r631265/AppData/Local/Temp/1/RtmpS0efnQ/devtools18fc5f2414b/ropensci-magick-7925af3"  \
  --library="C:/Users/r631265/Documents/R/win-library/3.4"  \
  --install-tests 

* installing *source* package 'magick' ...
** libs

*** arch - i386
rm -f RcppExports.o animation.o attributes.o base.o color.o composite.o config.o convolve.o device.o edit.o fonts.o options.o resize.o transformations.o magick.dll
Linking to imagemagagick-6.9.9
"C:/PROGRA~1/R/R-34~1.3/bin/i386/Rscript.exe" "../tools/winlibs.R" 6.9.9
Error in curl::curl_download(sprintf("https://github.com/rwinlib/imagemagick%s/archive/v%s.zip",  : 
  schannel: failed to receive handshake, SSL/TLS connection failed
Calls: <Anonymous> -> .Call
Execution halted
make: *** [winlibs] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-34~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.3/share/make/winshlib.mk" CXX='$(CXX11) $(CXX11STD)' CXXFLAGS='$(CXX11FLAGS)' CXXPICFLAGS='$(CXX11PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX11LDFLAGS)' SHLIB_LD='$(SHLIB_CXX11LD)' SHLIB="magick.dll" OBJECTS="RcppExports.o animation.o attributes.o base.o color.o composite.o config.o convolve.o device.o edit.o fonts.o options.o resize.o transformations.o"' had status 2
ERROR: compilation failed for package 'magick'
* removing 'C:/Users/r631265/Documents/R/win-library/3.4/magick'
In R CMD INSTALL
Installation failed: Command failed (1)

我想也许我的防火墙详细信息没有传递到:curl::curl_download(sprintf("https://github.com/rwinlib/imagemagick%s/archive/v%s.zip",...)

网络安全对我来说有点像一个黑匣子,所以我不确定还有什么可以尝试的,或者我是否正确地诊断了问题。任何帮助将不胜感激!

4

0 回答 0