RSQLite error on install

Hi
I try to use RSQLite in rstudio cloud.
I get an error and the library wont work.
Any clou why this happens?
Had the same issue with ggplot2

Hi, welcome!

We are going to need more information to help you out, What commands are you using to install RSQLite and ggplot2? what are the error messages you are getting?

I just have checked and I have no problem at all installing those libraries on a RStudio Cloud project with R 3.6.0

Hi
Thanks for taking your time.

I usually do it by "Packages" tab. But i had problems there.

Then i was looking for help in my past exercises an found this: origin from the local installed RStudio verson.

install.packages("RSQLite")
Error in install.packages : Updating loaded packages
> library(rsqlite)
Error in library(rsqlite) : there is no package called ‘rsqlite’

I tryed later at home with this which obviously not worked.

> install.packages("RSQLite")
Error in install.packages : Updating loaded packages
> install.packages("RSQLite")
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘bit’, ‘bit64’, ‘blob’, ‘DBI’, ‘memoise’

trying URL 'http://cran.rstudio.org/src/contrib/bit_1.1-15.tar.gz'
Content type 'application/x-gzip' length 56620 bytes (55 KB)
==================================================
downloaded 55 KB

trying URL 'http://package-proxy/src/contrib/bit64_0.9-7.tar.gz'
Content type 'application/x-tar' length 539438 bytes (526 KB)
==================================================
downloaded 526 KB

trying URL 'http://package-proxy/src/contrib/blob_1.2.0.tar.gz'
Content type 'application/x-tar' length 42606 bytes (41 KB)
==================================================
downloaded 41 KB

trying URL 'http://package-proxy/src/contrib/DBI_1.1.0.tar.gz'
Content type 'application/x-tar' length 592955 bytes (579 KB)
==================================================
downloaded 579 KB

trying URL 'http://package-proxy/src/contrib/memoise_1.1.0.tar.gz'
Content type 'application/x-tar' length 34441 bytes (33 KB)
==================================================
downloaded 33 KB

trying URL 'http://package-proxy/src/contrib/RSQLite_2.2.0.tar.gz'
Content type 'application/x-tar' length 4056414 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

* installing *source* package ‘bit’ ...
** package ‘bit’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/opt/R/3.6.0/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c attrutil.c -o attrutil.o
gcc -I"/opt/R/3.6.0/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c bit.c -o bit.o
gcc -I"/opt/R/3.6.0/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c chunkutil.c -o chunkutil.o
gcc -I"/opt/R/3.6.0/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c clone.c -o clone.o
gcc -I"/opt/R/3.6.0/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c init.c -o init.o
gcc -I"/opt/R/3.6.0/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c rle.c -o rle.o
gcc -shared -L/opt/R/3.6.0/lib/R/lib -L/usr/local/lib -o bit.so attrutil.o bit.o chunkutil.o clone.o init.o rle.o -L/opt/R/3.6.0/lib/R/lib -lR
installing to /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-bit/00new/bit/libs

** R
** exec
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (bit)
* installing *binary* package ‘blob’ ...
* DONE (blob)
* installing *binary* package ‘DBI’ ...
* DONE (DBI)
* installing *binary* package ‘memoise’ ...
* DONE (memoise)
* installing *binary* package ‘bit64’ ...
* DONE (bit64)
* installing *binary* package ‘RSQLite’ ...
* DONE (RSQLite)

The downloaded source packages are in
	‘/tmp/Rtmpx1xizJ/downloaded_packages’
> library(rsqlite)
Error in library(rsqlite) : there is no package called ‘rsqlite’
> library(RSQLite)
Error: package or namespace load failed for ‘RSQLite’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘DBI’ 1.0.0 is already loaded, but >= 1.1.0 is required
> library(RSQLite)
Error: package or namespace load failed for ‘RSQLite’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘DBI’ 1.0.0 is already loaded, but >= 1.1.0 is required
> library(RSQLite)
Error: package or namespace load failed for ‘RSQLite’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘DBI’ 1.0.0 is already loaded, but >= 1.1.0 is required
> politician_db  <- DBI::dbGetQuery(zh_politicians.db)
Error in DBI::dbGetQuery(zh_politicians.db) : 
  object 'zh_politicians.db' not found
> dbConnect(zh_politicians.db)
Error in dbConnect(zh_politicians.db) : 
  could not find function "dbConnect"
> library(RSQLite)
Error: package or namespace load failed for ‘RSQLite’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘DBI’ 1.0.0 is already loaded, but >= 1.1.0 is required

***********   Last try

install.packages("RSQLite")
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://package-proxy/src/contrib/RSQLite_2.2.0.tar.gz'
Content type 'application/x-tar' length 4056414 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

* installing *binary* package ‘RSQLite’ ...
* DONE (RSQLite)

The downloaded source packages are in
	‘/tmp/RtmpOoyTiF/downloaded_packages’

seems to work now

You have already installed RSQLite (R is case sensitive so make sure to respect the upper cases) but when you try to load it, is asking you to update DBI package, try updating it

install.packages("DBI")

Hi
DBI seems to be ok now.

But i was wondering whats about ggplot2!

packageVersion("ggplot2")
[1] ‘3.2.1’

install.packages("ggplot2")
Error in install.packages : Updating loaded packages

Restarting R session...

install.packages("ggplot2")
Error in install.packages : Updating loaded packages

Restarting R session...

install.packages("ggplot2")
Error in install.packages : Updating loaded packages

Restarting R session...

install.packages("ggplot2")
Error in install.packages : Updating loaded packages

persistant error loop until i say no to update.
Then it seems to install it.

install.packages("ggplot2")
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://package-proxy/src/contrib/ggplot2_3.2.1.tar.gz'
Content type 'application/x-tar' length 3986007 bytes (3.8 MB)

downloaded 3.8 MB

  • installing binary package ‘ggplot2’ ...
  • DONE (ggplot2)

The downloaded source packages are in
‘/tmp/RtmpXM0qPn/downloaded_packages’

packageVersion("ggplot2")
[1] ‘3.2.1’

At the end is one thing which makes me wonder:
Why does this error appear first time and i choose to "no" it goes on.

Anyway thanks for taking your time.

Regards
Simon

That is an odd behavior but I'm unable to reproduce so maybe if you relaunch your project it will go away, give it a try.

Thanks a lot.
I will do it in worst case.
Otherwise i will loose the files - i could export the - but 4 now i gona bend around.