gpt4 book ai didi

r - R 中的非零退出状态

转载 作者:太空宇宙 更新时间:2023-11-04 12:18:52 25 4
gpt4 key购买 nike

我有一个典型的非零退出状态问题,我在这个论坛上经常看到。但是,我已经尝试了传统上用于解决此问题的所有修复程序,但均无效果。有关完整代码,请参见下文。我正在运行 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: stdin: 意外的文件结尾/bin/tar: child 返回​​状态 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

最佳答案

原因是包使用了旧位置。

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

> 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/p>

然后使用 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

关于r - R 中的非零退出状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46596981/

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