Search code examples
rr-dbi

Package installation requires newer version of dependency


While installing mapview I get the error: namespace ‘DBI’ 0.6-1 is being loaded, but >= 0.8 is required

> install.packages("mapview")
> ... 
> Error: package or namespace load failed for ‘sf’ in loadNamespace(j <- i[[1L]], 
> c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
    namespace ‘DBI’ 0.6-1 is being loaded, but >= 0.8 is required
> ...

But I have DBI v 1.0.0 installed.

> library(DBI)
> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] DBI_1.0.0 sf_0.7-0 

loaded via a namespace (and not attached):
 [1] compiler_3.4.4 magrittr_1.5   class_7.3-14   tools_3.4.4    units_0.6-1    yaml_2.1.14   
 [7] Rcpp_0.12.19   grid_3.4.4     e1071_1.7-0    classInt_0.2-3 spData_0.2.9.4

I've already tried uninstalling and re-installing DBI.

What else might I try?


Solution

  • There are likely multiple versions of DBI installed on your system; use installed.packages() to verify this, and if possible remove all with repeated calls to remove.packages("DBI").

    If one or more of the DBI packages can't be removed (e.g., in a system-wide .libPaths() location), a work-around is to install the desired package without testing that it has been installed correctly

    install.packages("mapview", INSTALL_opts="--no-test-load")