问题描述

R4.3.1版本安装Matrix包时报错,提示没有符合版本的R包

`install.packages("Matrix", repos="https://mirrors.ustc.edu.cn/CRAN/")
Warning message:
package ‘Matrix’ is not available for this version of R
‘Matrix’ version 1.7-0 is in the repositories but depends on R (>= 4.4.0)
‘Matrix’ version 1.7-0 is in the repositories but depends on R (>= 4.5)

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

解决方案:

网站查询名称带有Matrix的R包,https://cran.r-project.org/bin/macosx/contrib/4.0/

packageurl <- “https://cran.r-project.org/bin/macosx/contrib/4.0/Matrix_1.4-1.tgz”
install.packages(packageurl, repos=NULL, type=“source”)

在页面上搜了唯一一个能安装的Matrix包,运气爆表,安装成功。

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐