Updating Shiny package from 1.0 to 1.1

shiny
package-installation

#1

I am trying to update shiny to version 1.1 from 1.0. I have installed it several times with install.packages(shiny) but each time I check packageVersion("shiny") I still see version 1.0. Because of this, I am unable to run my app which contains a data table. Here is the error message I get:

Loading required package: shiny
Warning: package ‘shinythemes’ was built under R version 3.3.3
Warning: package ‘DT’ was built under R version 3.3.3

Attaching package: ‘DT’

The following objects are masked from ‘package:shiny’:

    dataTableOutput, renderDataTable

Error in checkShinyVersion() : 
  Please upgrade the 'shiny' package to (at least) version 1.1

Updating packages doesn't do anything
#2

Hi @iFeanyi - can you provide the exact code and the console output you are using to install the package as well as load it? If you can, use the reprex so that all the code and output is available to help diagnose the problem you are having.


#3

Hi, I downloaded and installed the Rtool, and then installed shiny from source using install.packages("shiny",type="source") Now when I tried to run the app, I am getting the following error message:

Error in library.dynam(lib, package, package.lib) : 
  DLL ‘httpuv’ not found: maybe not installed for this architecture?

#4

Here is the full code:


install.packages("httpuv")

  There is a binary version available but the source version is
  later:
       binary source needs_compilation
httpuv  1.4.1  1.4.5              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘httpuv’

trying URL 'https://cran.rstudio.com/src/contrib/httpuv_1.4.5.tar.gz'
Content type 'application/x-gzip' length 1675895 bytes (1.6 MB)
downloaded 1.6 MB

ERROR: failed to lock directory 'C:/Users/Idiaye/Documents/R/R-3.3.0/library' for modifying
Try removing 'C:/Users/Idiaye/Documents/R/R-3.3.0/library/00LOCK-httpuv'
Warning in install.packages :
  running command '"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/bin/i386/R" CMD INSTALL -l "C:\Users\Idiaye\Documents\R\R-3.3.0\library" C:\Users\Idiaye\AppData\Local\Temp\Rtmp2heFJ8/downloaded_packages/httpuv_1.4.5.tar.gz' had status 3
Warning in install.packages :
  installation of package ‘httpuv’ had non-zero exit status

The downloaded source packages are in
	‘C:\Users\Idiaye\AppData\Local\Temp\Rtmp2heFJ8\downloaded_packages’

Restarting R session...

> install.packages("later")

  There is a binary version available but the source version is
  later:
      binary source needs_compilation
later  0.7.1  0.7.5              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘later’

trying URL 'https://cran.rstudio.com/src/contrib/later_0.7.5.tar.gz'
Content type 'application/x-gzip' length 38900 bytes (37 KB)
downloaded 37 KB

* installing *source* package 'later' ...
** package 'later' successfully unpacked and MD5 sums checked

   **********************************************
   WARNING: this package has a configure script
         It probably needs manual configuration
   **********************************************


** libs
C:/Rtools/mingw_32/bin/g++  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c RcppExports.cpp -o RcppExports.o
C:/Rtools/mingw_32/bin/g++  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c callback_registry.cpp -o callback_registry.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c init.c -o init.o
C:/Rtools/mingw_32/bin/g++  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c later.cpp -o later.o
C:/Rtools/mingw_32/bin/g++  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c later_native.cpp -o later_native.o
C:/Rtools/mingw_32/bin/g++  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c later_posix.cpp -o later_posix.o
C:/Rtools/mingw_32/bin/g++  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c later_win32.cpp -o later_win32.o
C:/Rtools/mingw_32/bin/g++  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c timer_posix.cpp -o timer_posix.o
C:/Rtools/mingw_32/bin/g++  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c timestamp_unix.cpp -o timestamp_unix.o
C:/Rtools/mingw_32/bin/g++  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c timestamp_win32.cpp -o timestamp_win32.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/include" -DNDEBUG -DTHREADS_H_SUPPORT=-1   -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/Rcpp/include" -I"C:/Users/Idiaye/Documents/R/R-3.3.0/library/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c tinycthread/tinycthread.c -o tinycthread/tinycthread.o
C:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o later.dll tmp.def RcppExports.o callback_registry.o init.o later.o later_native.o later_posix.o later_win32.o timer_posix.o timestamp_unix.o timestamp_win32.o ./tinycthread/tinycthread.o -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/Users/Idiaye/DOCUME~1/R/R-33~1.0/bin/i386 -lR
installing to C:/Users/Idiaye/Documents/R/R-3.3.0/library/later/libs/i386
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (later)

The downloaded source packages are in
	‘C:\Users\Idiaye\AppData\Local\Temp\RtmpM5FN2H\downloaded_packages’
> shiny::
Error: unexpected end of line in "shiny::"
> install.packages("shiny",type="source")
trying URL 'https://cran.rstudio.com/src/contrib/shiny_1.1.0.tar.gz'
Content type 'application/x-gzip' length 2350156 bytes (2.2 MB)
downloaded 2.2 MB

ERROR: failed to lock directory 'C:/Users/Idiaye/Documents/R/R-3.3.0/library' for modifying
Try removing 'C:/Users/Idiaye/Documents/R/R-3.3.0/library/00LOCK-shiny'
Warning in install.packages :
  running command '"C:/Users/Idiaye/DOCUME~1/R/R-33~1.0/bin/i386/R" CMD INSTALL -l "C:\Users\Idiaye\Documents\R\R-3.3.0\library" C:\Users\Idiaye\AppData\Local\Temp\RtmpM5FN2H/downloaded_packages/shiny_1.1.0.tar.gz' had status 3
Warning in install.packages :
  installation of package ‘shiny’ had non-zero exit status

The downloaded source packages are in
	‘C:\Users\Idiaye\AppData\Local\Temp\RtmpM5FN2H\downloaded_packages’
> shiny::runApp('Plots')
Error in library.dynam(lib, package, package.lib) : 
  DLL ‘httpuv’ not found: maybe not installed for this architecture?

#5

I just tried to re-download and install shiny from the CRAN site, but here is the message I got:

install.packages("shiny")

  There is a binary version available but the source version is
  later:
      binary source needs_compilation
shiny  1.0.5  1.1.0             FALSE

installing the source package ‘shiny’

trying URL 'https://cran.rstudio.com/src/contrib/shiny_1.1.0.tar.gz'
Warning in install.packages :
  InternetOpenUrl failed: 'The server name or address could not be resolved'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.rstudio.com/src/contrib/shiny_1.1.0.tar.gz'
Warning in install.packages :
  download of package ‘shiny’ failed

#6

There are two different types of install problems happening here. First, the installation of both httpuv and shiny failed with the same symptoms:

This can happen when a previous installation attempt ended unexpectedly, before R had time to clean up some of the intermediate files it creates during installation. Have you tried removing those lock files, as R suggests?

Meanwhile, the second error:

This indicates that after package installation had begun, something went wrong with R's internet connection (if this has happened before, it could be the reason you have those intermediate files hanging around). This isn't easy to debug from afar — it most likely has to do with the reliability of your local network or its connection to the internet.

Overall, though, is there a reason you are still running R 3.3? (that version is from 2 years ago — the current version is 3.5.1) Updating R to the latest version will mean that many more packages have available binaries, easing your installation process considerably.


#7

Yes, I have removed the lock files, and have succeeded in updating shiny to version 1.1, and my app now runs again. But could the version of R I am running be the reason why the 'Buttons' extension for data table is not working well? I have added the extension code, but only the 'copy' and 'print' buttons work, and the 'pdf' and 'csv' buttons do not work.


#8

Please how do I ascertain what version of R I am using? Sorry if my questions sound very elementary and naive


#9

A post was split to a new topic: Error: unexpected datatables/htmlwidget output


#10

My favorite way is by running sessionInfo() at the console. (There's also R.version(), but its output is less easy to read).


#11

I think this is unlikely? Since your question about that code isn't really related to the rest of this topic, I'm going to keep things tidy and move it to its own topic.