英文:
Default packages not found in R (Ubuntu)
问题
I'm new with R and I'm having some problems in making it work properly.
When I type "R" in my terminal (linux Ubuntu) I get the following warning:
During startup - Warning messages:
1: package ‘utils’ in options("defaultPackages") was not found
2: package ‘stats’ in options("defaultPackages") was not found
which I think are the cause of many other problems like not being able to install other packages.
I read a lot of similar question but they were very old and I have not been able to adapt them to my case. Anyway, I think that the problem is something related to the default packages folders.
I cannot install Rstudio because it's a machine with only terminal access.
Thanks to anyone who can help me.
英文:
i'm new with R and i'm having some problems in making it work properly.
When I type "R" in my terminal (linux Ubuntu) I get the following warning:
During startup - Warning messages:
1: package ‘utils’ in options("defaultPackages") was not found
2: package ‘stats’ in options("defaultPackages") was not found
which I think are the cause of many other problems like not being able to install other packages.
I read a lot of similar question but they were very old and I have not been able to adapt them to my case.
Anyway, I think that the problem is something related to the default packeges folders.
I cannot install Rstudio because it's a machine with only terminal access.
Thanks to anyone who can help me.
答案1
得分: 1
如果你访问https://cran.r-project.org/,然后点击“下载适用于Unix的R”,然后选择Ubuntu,你会找到一个充满有关如何正确从终端会话中安装R和R包的信息页面。
但是,如果你不知何故毁坏了Ubuntu安装,以至于根本没有桌面,甚至无法运行Web浏览器,那么你可能会遇到更大的问题。
英文:
if you go to https://cran.r-project.org/ and click on "download R for unix" , then select Ubuntu, you'll find a page full of info on how properly to install R and R packages from a terminal session.
However, if you somehow managed to destroy your Ubuntu install such that there is no Desktop at all and you can't even run a web browser, then you may have bigger problems.
答案2
得分: 0
我找到了解决办法:
显然,在加载 R 时,某个 bash 脚本使用 which
命令获取某物的完整路径。现在,我不知道为什么,在我的 Linux 安装中,which
命令的名称是 which.debianutils
,而可执行文件 /bin/which
不存在。我通过运行 sudo apt reinstall debianutils
来解决了这个问题。
英文:
I found the solution for my problem:
apparently during the loading of R, some bash script uses the which
command to get the full path of something. Now, I don't know why, on my linux installation the which
command was named which.debianutils
and the executable /bin/which
was not present. I solved with sudo apt reinstall debianutils
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论