R 3.6.0中安装“ car”软件包的退出状态为非零

时间:2019-05-29 19:20:14

标签: r package install.packages

我尝试在Windows版本car中安装R 3.6.0软件包。我使用Windows 8.1。我收到以下错误消息:installation of package ‘car’ had non-zero exit status

完整输出:

> install.packages("car")
Installing package into ‘C:/Users/Zsófia/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---

  There is a binary version available but the source version is later:
    binary source needs_compilation
car  3.0-2  3.0-3             FALSE

installing the source package ‘car’

trying URL 'https://cloud.r-project.org/src/contrib/car_3.0-3.tar.gz'
Content type 'application/x-gzip' length 539020 bytes (526 KB)
downloaded 526 KB

* installing *source* package 'car' ...
** package 'car' successfully unpacked and MD5 sums checked
** using staged installation
Warning in file(file, if (append) "a" else "w") :
  cannot open file 'C:/Users/Zssfia/Documents/R/win-library/3.6/00LOCK-car/00new/car/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") : 
  cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'car'
* removing 'C:/Users/Zsófia/Documents/R/win-library/3.6/car'

The downloaded source packages are in
        ‘C:\Users\Zsófia\AppData\Local\Temp\RtmpK0Qk4Q\downloaded_packages’
Warning message:
In install.packages("car") :
  installation of package ‘car’ had non-zero exit status

其他软件包,例如psych已成功安装。

1 个答案:

答案 0 :(得分:1)

对于Windows,请尝试使用汽车包装的3.0.2版本。

install.packages("https://cran.r-project.org/bin/windows/contrib/3.5/car_3.0-2.zip",
                 lib = .libPaths()[1], repos = NULL, type = "win.binary")
packageVersion("car")

package ‘car’ successfully unpacked and MD5 sums checked
> packageVersion("car")
[1] ‘3.0.2’