gpt4 book ai didi

r - 无法运行程序 "Rscript"

转载 作者:可可西里 更新时间:2023-11-01 16:51:44 26 4
gpt4 key购买 nike

您好,我正在使用 oozie 运行 sparkR 作业。当我运行 oozie 作业时,它显示找不到 Rscript 错误。错误详细信息如下

Caused by: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 0.0 failed 4 times, most recent failure: Lost task 0.3 in stage 0.0 (TID 7, ip-172-31-42-124.us-west-2.compute.internal): java.io.IOException: Cannot run program "Rscript": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at edu.berkeley.cs.amplab.sparkr.RRDD$.createRProcess(RRDD.scala:387)
at edu.berkeley.cs.amplab.sparkr.RRDD$.createRWorker(RRDD.scala:403)
at edu.berkeley.cs.amplab.sparkr.BaseRRDD.compute(RRDD.scala:47)
at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:277)
at org.apache.spark.rdd.RDD.iterator(RDD.scala:244)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:61)
at org.apache.spark.scheduler.Task.run(Task.scala:64)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:203)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 11 more

我们将不胜感激。

最佳答案

您的系统路径中是否添加了 Rscript。

例如在windows中它的位置是

C:\Program Files\R\R-3.2.1\bin

您必须在环境变量的系统路径中添加Rscript.exe 的路径。

关于r - 无法运行程序 "Rscript",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32518168/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com