可以尝试使用管理员权限运行安装一下看看,参考这两个帖子:https://stackoverflow.com/questions/60995327/problem-installing-packages-in-r-unable-to-create-temporary-directoryhttps://community.rstudio.com/t/unable-to-install-packages-create-library/43031/2