I attempted install.packages("RMySQL")
and it runs for a second and then says:
Error in install.packages : cannot remove prior installation of package ‘DBI’
I did remove.packages("DBI")
and it says:
remove.packages("DBI") Removing package from ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library’ (as ‘lib’ is unspecified)
Then I retry install.packages("RMySQL")
and it says:
Error in install.packages : cannot remove prior installation of package ‘DBI’
The DBI dependency is not actually getting removed or something. Or possibly I removed it from the wrong area? I'm confused.
Restarting R prior to updating these packages is strongly recommended. RStudio can restart R and then automatically continue the installation after restarting (all work and data will be preserved during the restart).
If you need to do an uninstall package operation from within your code, you need to use the remove packages function at the command prompt. This command has the format of remove. packages(“name”) where “name” is the package name to be removed.
Try starting R without any startup files to prevent DBI from being loaded (however that happens on your box).
You should then be able to just delete the unattached package.
Alternatively, just remove the DBI/
directory from library directory.
It should look similar to this:
$ R --vanilla ## prevent inits at load R version 3.4.1 (2017-06-30) -- "Single Candle" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ls() ## no variables character(0) > search() ## no packages besides Base [1] ".GlobalEnv" "package:stats" "package:graphics" [4] "package:grDevices" "package:utils" "package:datasets" [7] "package:methods" "Autoloads" "package:base" >
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With