简体   繁体   中英

Windows R:grImport ghostscript error 'status 127'

I've installed Ghostscript and grImport in R (Windows, Rstudio). I'm following the tutorial but I immediately get the error,

> library(grImport)
Loading required package: grid
Loading required package: XML
> PostScriptTrace("petal.ps")
Error in PostScriptTrace("petal.ps") : 
  status 127 in running command 'gswin32c.exe -q -dBATCH -dNOPAUSE -sDEVICE=ps2write -sOutputFile=C:\Users\UsrNm\AppData\Local\Temp\RtmpsXXlWA\file1b5c623f48de -sstdout=petal.ps.xml capturepetal.ps'
In addition: Warning message:
running command 'gswin32c.exe -q -dBATCH -dNOPAUSE -sDEVICE=ps2write -sOutputFile=C:\Users\UsrNm\AppData\Local\Temp\RtmpsXXlWA\file1b5c623f48de -sstdout=petal.ps.xml capturepetal.ps' had status 127

Any help would be appreciated.

我在Windows 10下遇到了同样的问题,我通过手动设置ghostscript的路径解决了这个问题:

Sys.setenv(R_GSCMD = normalizePath("C:/gs/gs9.20/bin/gswin32c.exe")) 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM