无法卸载软件包

时间:2017-06-21 16:17:53

标签: r uninstall install.packages

您好我卸载了一个软件包,但它仍然可以访问,有人可以帮忙吗?谢谢你!

> remove.packages("RODBC")
Removing package from ‘E:/R/R-3.3.3/library’
(as ‘lib’ is unspecified)

> library(RODBC)
# no error. it's still there

> attr(sessionInfo()$otherPkgs$RODBC, "file")
[1] "E:/R/R-3.3.3/library/RODBC/Meta/package.rds"
# it really is there...


> remove.packages("dplyr")
Removing package from ‘E:/R/R-3.3.3/library’
(as ‘lib’ is unspecified)
> library(dplyr)
Error in library(dplyr) : there is no package called ‘dplyr’
# this guy is removed


> .Library
[1] "E:/R/R-3.3.3/library"

> .libPaths()
[1] "E:/R/R-3.3.3/library"

是否可能正在使用包RODBC以便无法删除?

2 个答案:

答案 0 :(得分:2)

之前发生过这种情况,我认为我所做的就是从我的计算机上的文件浏览器中找到包的文件夹并手动将其删除

答案 1 :(得分:-1)

我也遇到了同样的麻烦,所以我尝试手动删除软件包,但是发现我没有root权限。然后我关闭R,并以sudo开头,尝试再次删除软件包。但是,它对我有用。