I was having trouble re-installing. I had updated R, and was getting the "BiocInstaller version x.y is too old for R version p.q" message. Attempts to follow the troubleshooting instructions were failing; Running
remove.packages("BiocInstaller") would claim the package was not installed, yet it was (and remained so).
Apparently at some point I had installed BioConductor (or at least some of its packages) as root. This means the packages were "not accessible" by a "normal" user. I resolved the problem by:
- starting R as root:
sudo R --vanilla
Reinstall (as a 'normal' user; no
sudo) in R using
biocValid() can check the package install paths (via
find.package() ) to see if some locations are root owned, and warn the user in such cases? Note that some BioConductor packages are also in system repositories; For example on Ubuntu 14.04.5 LTS I can see a couple dozen entries like
r-bioc-limma. Such installations would likely also cause issues with re-installation attempts. While these situations are likely uncommon, it may be worth highlighting them in the troubleshooting documentation?
edit: I should emphasize that you should only run the above code (R as sudo) if you've identified that root-installed packages are causing an issue. In general, don't run code as root.