简体   繁体   English

我只能在桌面上打开R才能在R中安装软件包

[英]I can install packages in R only opening R from the desktop

I have this problem. 我有这个问题。 I have installed "R x64 3.5.2" on Windows 10 and created a shortcut on my desktop to open it. 我已经在Windows 10上安装了“ R x64 3.5.2”,并在桌面上创建了一个快捷方式来打开它。 If I open R from the shortcut I can install packages without problems, and R saves all the packages in the folder C:\\Users\\Name_of_my_user\\RtmpGCLl28. 如果我从快捷方式打开R,我可以毫无问题地安装软件包,并且R将所有软件包保存在文件夹C:\\ Users \\ Name_of_my_user \\ RtmpGCLl28中。 If I open R from the folder where R is installed (the same that the shortcut should open) I can't find the libraries that I previously installed and in addition to that I cannot install packages and R returns these lines: 如果我从安装了R的文件夹中打开R(与快捷方式应该打开的文件夹相同),我找不到我之前安装的库,除此之外我无法安装软件包,R返回以下行:

Errore: unable to create temporary directory 'C:\\Users\\Name_of_the_user\\Documents\\R\\win-library\\3.5\\file14a830d675c9' Inoltre: Warning message: In dir.create(tmpDir) : cannot create dir 'C:\\Users\\Name_of_the_user\\Documents\\R\\win-library\\3.5\\file14a830d675c9', reason 'No such file or directory' 错误:无法创建临时目录'C:\\ Users \\ Name_of_the_user \\ Documents \\ R \\ win-library \\ 3.5 \\ file14a830d675c9'Inoltre:警告消息:在dir.create(tmpDir)中:无法创建dir'C:\\ Users \\ Name_of_the_user \\ Documents \\ R \\ win-library \\ 3.5 \\ file14a830d675c9',原因'没有这样的文件或目录'

How can I fix this problem? 我该如何解决这个问题? Thank you. 谢谢。

Perhaps it's a permission-related error. 也许这是与许可相关的错误。 Try "Run as administrator" option. 尝试“以管理员身份运行”选项。 Also, following solutions maybe work for you: [1] [2] [3] [4] 另外,以下解决方案可能对您有用: [1] [2] [3] [4]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM