首页 > 解决方案 > install.package("matlib") 在 RStudio 中显示非零退出状态错误

问题描述

我尝试了 install.package() 功能以及通过 tar.gz 文件安装,但每次它显示相同的错误是non-zero exit status.
请问有人可以告诉如何下载matlib?我已经R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"安装在 Ubuntu 16.04 中。

Error::::::::

> install.packages("matlib")
Installing package into ‘/home/harsh/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
  dependency ‘car’ is not available
--2020-08-03 15:07:43--  https://cran.rstudio.com/src/contrib/matlib_0.9.3.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 2600:9000:21f0:8000:6:c2d3:f940:93a1, 2600:9000:21f0:8600:6:c2d3:f940:93a1, 2600:9000:21f0:9800:6:c2d3:f940:93a1, ...
Connecting to cran.rstudio.com (cran.rstudio.com)|2600:9000:21f0:8000:6:c2d3:f940:93a1|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 220211 (215K) [application/x-gzip]
Saving to: ‘/tmp/Rtmpb8wWqf/downloaded_packages/matlib_0.9.3.tar.gz’

     0K .......... .......... .......... .......... .......... 23%  428K 0s
    50K .......... .......... .......... .......... .......... 46%  457K 0s
   100K .......... .......... .......... .......... .......... 69%  217K 0s
   150K .......... .......... .......... .......... .......... 93%  487K 0s
   200K .......... .....                                      100%  500K=0.6s

2020-08-03 15:07:44 (365 KB/s) - ‘/tmp/Rtmpb8wWqf/downloaded_packages/matlib_0.9.3.tar.gz’ saved [220211/220211]

ERROR: dependency ‘car’ is not available for package ‘matlib’
* removing ‘/home/harsh/R/x86_64-pc-linux-gnu-library/3.2/matlib’
Warning in install.packages :
  installation of package ‘matlib’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpb8wWqf/downloaded_packages’

标签: rubuntu

解决方案


安装一个包应该安装它的依赖项。如果失败,您可能需要手动安装依赖项。car如果当前版本car需要R比您使用的版本更新的版本,安装包可能会失败。该R.Version()功能将告诉您R您正在使用哪个版本。R在安装之前,您可能需要更新到当前版本car


推荐阅读