【问题标题】:Error in installing car package in R在R中安装汽车包时出错
【发布时间】:2018-02-03 09:35:20
【问题描述】:

在 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”包。 请帮我。提前致谢。

【问题讨论】:

  • 什么版本的 R?这真的是一个 RStudio 问题还是在控制台的 R 中是一样的?
  • R 版本 3.3.2 是纯 Rstudio 问题。
  • cannot open URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz' 也闻起来像本地网络问题,我无法重现。再试一次。再试一次,看看您是否可以在浏览器中访问该 URL,然后再试一次。
  • 升级到 3.4.x 并重新安装所有东西。

标签: r dependencies rstudio install.packages r-car


【解决方案1】:

我在 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 的东西。 祝你好运。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-01
    • 2019-02-28
    • 2018-08-31
    • 1970-01-01
    相关资源
    最近更新 更多