0

在 Ubuntu 的 Rstudio 中安装“car”包时,我遇到了一个错误,说没有安装依赖项“nloptr”、“lme4”等。所以我开始安装“nloptr”,但我遇到了这个错误——

 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: unexpected end of file
  /bin/tar: Child returned status 1
  /bin/tar: Error is not recoverable: exiting now
  Warning message:
  In untar(tarfile = "nlopt-2.4.2.tar.gz") :
  '/bin/tar -xf 'nlopt-2.4.2.tar.gz'' returned error code 2
  configure: Starting to install library to 
  /tmp/RtmpSeLv7g/R.INSTALL18a67910d582/nloptr/nlopt-2.4.2
 ./configure: line 3325: cd: nlopt-2.4.2: No such file or directory

系统在最后一行之后挂起,当我在一段时间后重新启动时,没有安装“nloptr”,因此我无法安装“car”包。请帮我。提前致谢。

4

1 回答 1

0

我在 R(Linux Debian 上的纯 R 3.2.3)下遇到了同样的问题。在同一安装过程中,我首先被另一个问题阻止:安装过程无法锁定目录 ~/.../R/x86_64.../3.2 并建议删除 ~/.../R/x86_64.../ 3.2/00LOCK-nloptr 。我做到了,重新启动汽车包安装,然后它在同一点阻塞:它需要nlopt.h。所以,我安装了 libnlopt-dev (sudo apt-get install libnlopt-dev) 并重新启动汽车安装......然后它工作了。好的,这是在 linux 下,但也许您应该尝试专注于在 windows 下安装有关 NLOPT 的东西。祝你好运。

于 2018-02-08T17:02:24.450 回答