我在 Ubuntu 22.04 上安装了 R 4.3.3 版本,但不知何故无法正常工作,因此我不得不安装旧版本。我清除了较新的版本并安装了3.6.3版本与另一个版本rstudio
,但无法打开。
它说的是:
R shared library (/usr/local/lib/R/lib/libR.so) not found. If this is a custom build of R, was it built with the --enable-R-shlib option?
我再次删除了源目录并卸载rstudio
,然后再次安装了新版本(我只是一个初学者)。。。
重点是,当我打开 R 时,它说
/usr/bin/R: line 249: /usr/lib/R/etc/ldpaths: No such file or directory
在顶部,并在启动时显示 - 警告信息:
In file(file, "rt") :
cannot open file '/usr/lib/R/etc/repositories': No such file or directory
当我尝试在工作室中安装软件包时,部分错误如下
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
和:
Warning in install.packages :
installation of package ‘data.table’ had non-zero exit status"
"installation of package ‘htmltools’ had non-zero exit status
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 249: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection"
我的文件/usr/lib/R/etc
如下图所示,repositories 文件是我自己创建的,它是空的: