package ‘car’ is not available (for R version 3.4.4)

一:Error: package ‘car’ is not available (for R version 3.4.4) 

Update version of R on Ubuntu:

Ubuntu Packages For R - Brief Instructions

Install R

Package for the current R 4.0. release* are available for most stable Desktop releases of Ubuntu until their official end of life date. However, only the latest Long Term Support (LTS) release is fully supported. As of November 1, 2020 the supported releases are

  • Groovy Gorilla (20.10, amd64 only),
  • Focal Fossa (20.04; LTS and amd64 only),
  • Bionic Beaver (18.04; LTS), and
  • Xenial Xerus (16.04; LTS).

Run these lines (as root or by prefixing sudo) to tell Ubuntu about the R binaries at CRAN.

# update indices
apt update -qq
# install two helper packages we need
apt install --no-install-recommends software-properties-common dirmngr
# import the signing key (by Michael Rutter) for these repo
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"

Here we use lsb_release -cs to access which Ubuntu flavor you run: one of “groovy”, “focal”, “bionic”, …

Then run

apt install --no-install-recommends r-base

to to install R and its dependencies.

For more detailed instructions, including details on administration and maintenance of R Packages, see the full README.

For older R releases, see the corresponding README.

Get 5000+ CRAN Packages

Run this command (as root or by prefixing sudo) to add the current R 4.0 or later ‘c2d4u’ repository:

add-apt-repository ppa:c2d4u.team/c2d4u4.0+

to add the key id for this repository, add the repository, and update the index. You can now do apt install --no-install-recommends r-cran-rstan or apt install --no-install-recommends r-cran-tidyverse (again as user root or via sudo)

二:安装问题:ERROR: configuration failed for package ‘curl’ ,   installation of package ‘curl’ had non-zero exit status

按着红框提示安装需要安装的package,

 sudo apt install libcurl4-openssl-dev


 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xiangyong58

喝杯茶还能肝到天亮,共同进步

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值