【问题标题】:Non-Zero Exit Status in RR中的非零退出状态
【发布时间】:2017-10-06 01:26:36
【问题描述】:

我在这个论坛上看到了很多典型的非零退出状态问题。但是,我已经尝试了传统上使用的所有修复程序来解决此问题,但没有任何工作。有关完整代码,请参见下文。我正在运行 Linux Mint OS 64 位,我最近安装它来运行 MATLAB,我怀疑我的问题与此有关。我之前有 Linux Mint OX 32 位,没有遇到这些问题。

尝试安装 plm 时出现新问题。下面的脚本出来了,包括底部的错误信息,然后R崩溃了,这是以前从未发生过的:

* installing *source* package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for pkg-config... yes
configure: Now testing for NLopt header file.
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking nlopt.h usability... no
checking nlopt.h presence... no
checking for nlopt.h... no
configure: Need to download and build NLopt
trying URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
Error in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-  2.4.2.tar.gz",  : 
cannot open URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
Execution halted
/bin/tar: This does not look like a tar archive

gzip:标准输入:文件意外结束 /bin/tar:子返回状态 1 /bin/tar:错误不可恢复:现在退出 警告信息: 在 untar(tarfile = "nlopt-2.4.2.tar.gz") 中: '/bin/tar -xf 'nlopt-2.4.2.tar.gz'' 返回错误码 2 配置:开始安装库到 /tmp/RtmpKVJuVy/R.INSTALL129b11f84296/nloptr/nlopt-2.4.2 ./configure: line 3325: cd: nlopt-2.4.2: No such file or directory

【问题讨论】:

  • 您说您“尝试了传统上用于解决此问题的所有修复程序,但都没有奏效。”只是确保...您是否尝试过通过打开终端(使用Ctrl+Alt+T)并使用命令sudo apt install g++来确保已安装g++?
  • 我希望没有人会问这个......我在发布这个并注意到文本的那部分后做了。它确实允许我像帖子中那样下载 Rcpp,但我仍然无法下载包“plm”,这是我真正的目标。我现在正在更新帖子以放入 plm 下载失败的文本。
  • 感谢您的帮助,我并不想暗示我不欣赏它。您的解决方案是正确的解决方案。
  • 很高兴您能够安装Rcpp,很抱歉您仍然遇到“plm”问题。我在您发布的软件包安装文本中没有看到任何异常...如果您可以发布整个输出,我可能会看到问题所在。
  • 抱歉回复晚了。该帖子已更新为尝试安装 plm 时出现的错误消息。

标签: r linux


【解决方案1】:

原因是包使用旧位置。

执行以下操作,看看这个文件被移动到哪里了。

> curl "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz" -o nlopt-2.4.2.tar.gz
> cat nlopt-2.4.2.tar.gz
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2.tar.gz">here</a>.</p>
<hr>
<address>Apache/2.4.10 (Debian) Server at ab-initio.mit.edu Port 80</address>
</body></html>

然后,尝试下载文件:https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2.tar.gz

并使用 R 安装这个包

curl "https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2.tar.gz" -o nlopt-2.4.2.tar.gz
R CMD INSTALL nlopt-2.4.2.tar.gz

【讨论】:

  • 要清楚,前两条指令进入latex终端窗口?
  • 不,你需要在“shell”中运行这些。例如。侏儒终端。可能需要以 root 权限执行“R CMD INSTALL”。在这种情况下,您将其称为“sudo R CMD INSTALL”并且您应该提供密码。但它取决于系统安装。
  • 当我尝试执行 sudo R CMD INSTALL nlopt-2.4.2.tar.gz 时,它会给出输出:错误 getOc​​tD(x, offset, len) : invalid octal digit
猜你喜欢
  • 2019-10-08
  • 2013-06-22
  • 2014-01-07
  • 2019-08-06
  • 2016-11-25
  • 1970-01-01
  • 1970-01-01
  • 2020-10-17
  • 1970-01-01
相关资源
最近更新 更多