很久以前我使用了一个名为 gdalUtils 的包。
我目前不需要它,它也没有安装在我当前版本的库中,但是当我尝试安装其他包时,它的缺失会导致错误:
Error in loadNamespace(x) : there is no package called ‘gdalUtils’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
Warning in install.packages :
installation of package ‘pkgbuild’ had non-zero exit status
Error in loadNamespace(x) : there is no package called ‘gdalUtils’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
Warning in install.packages :
installation of package ‘testthat’ had non-zero exit status
我现在无法安装它:
> install.packages("gdalUtils")
Warning in install.packages :
package ‘gdalUtils’ is not available for this version of R
我无法删除它:
Removing package from ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘gdalUtils’
我尝试使用 renv 包清除缓存:
> purge( "gdalUtils" )
* The requested package is not installed in the cache -- nothing to do.
>
Restarting R session...
Error in loadNamespace(x) : there is no package called ‘gdalUtils’
我怎样才能让 R 忘记我曾经有过这样的包?
答案1
gdal实用程序已从 CRAN 中删除。
有一个 CRAN R 包存储库的只读镜像。
gdalUtils
不再在 CRAN 中,因为它至少几年没有维护了,但您可以尝试从 GitHub 存储库安装它。
你可以试试:
install.packages("devtools")
devtools:::install_github("gearslaboratory/gdalUtils")
请注意 - 使用这个你会白费力气。你应该考虑一个全新的 R 设置。