R

时间:2017-10-06 01:26:36

标签: r linux

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

尝试安装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:stdin:意外的文件结束 / bin / tar:子项返回状态1 / bin / tar:错误无法恢复:现在退出 警告信息: 在untar中(tarfile =“nlopt-2.4.2.tar.gz”):   '/ bin / tar -xf'nlopt-2.4.2.tar.gz''返回错误代码2 configure:开始将库安装到/tmp/RtmpKVJuVy/R.INSTALL129b11f84296/nloptr/nlopt-2.4.2 ./configure:line 3325:cd:nlopt-2.4.2:没有这样的文件或目录

1 个答案:

答案 0 :(得分:0)

原因是包使用旧位置。

请执行以下操作,以查看此文件的移动位置。

> 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