简体   繁体   English

R 3.0.2上的install.packages(“ car”)在Ubuntu 14.04中失败

[英]install.packages(“car”) on R 3.0.2 fails in Ubuntu 14.04

I'm trying to do some linear regression models and I really need the package "car" but I can't install it. 我正在尝试做一些线性回归模型,但我确实需要“ car”软件包,但无法安装。

Warning message: package 'car' is not available (for R version 3.0.2) 警告消息:“ car”包不可用(对于R版本3.0.2)

Anyone knows what can I do to solve this? 谁知道我该怎么做才能解决这个问题?

Thank you very much 非常感谢你

Your proximal problem is that the current version of car on CRAN depends on R >= 3.2.0. 您的近端问题是CRAN的car的当前版本取决于R> = 3.2.0。

Farther upstream, the problem is that Ubuntu releases ship with the version of R that was current at the release time, and R evolves very quickly. 在更上游,问题在于Ubuntu发行版附带了发行时最新的R版本,并且R的发展非常迅速。 Your best bet is to follow the updating/installation directions for Ubuntu on CRAN , ie add 最好的选择是按照CRAN上Ubuntu更新/安装说明进行操作 ,即添加

deb https://cloud.r-project.org/bin/linux/ubuntu trusty/

to /etc/apt/sources.list (or via whatever package management tools you prefer), then sudo apt-get update , sudo apt-get upgrade . /etc/apt/sources.list (或通过您喜欢的任何软件包管理工具),然后sudo apt-get updatesudo apt-get upgrade

If it's absolutely necessary that you stick with that version of R, it's possible to download and install older versions from the archived versions of car on CRAN , but it's a bit of a rabbit hole ... 如果绝对有必要使用该版本的R,则可以在CRAN上car存档版本中下载并安装旧版本,但这有点麻烦 ...

It is possible that your default repository did not have "car" package. 您的默认存储库可能没有“ car”包。 Try 尝试

install.packages("car", dependencies=TRUE, repos='http://cran.rstudio.com/')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM