Default packages not found in R (Ubuntu)

huangapple go评论63阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年4月6日 19:55:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/75949233.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定