【问题标题】:Windows R:grImport ghostscript error 'status 127'Windows R:grImport ghostscript 错误“状态 127”
【发布时间】:2016-02-07 17:15:12
【问题描述】:

我已经在 R(Windows、Rstudio)中安装了 Ghostscript 和 grImport。我正在关注tutorial,但我立即收到错误消息,

> 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

任何帮助将不胜感激。

【问题讨论】:

  • 我对 R 一无所知,但您似乎正在使用参数“petal.ps”执行 PostScriptTrace,但是,正在调用 Ghostscript 并要求处理名为“capturepetal.ps”的文件'。所以也许它只是由文件不存在引起的。如果您可以在没有 -q 的情况下运行 Ghostscript 并捕获反向通道输出(stdout 似乎要转到 petal.ps.xml,因此您可以尝试查看),则可以说更多。
  • capturepetal.ps 是我认为的输出文件。

标签: r ghostscript grimport


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-03-30
    • 2015-05-21
    • 2018-01-30
    • 2020-12-06
    • 2021-11-04
    • 2018-10-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多