Updating packages doesn't do anything

package-installation

#1

So I want to install shiny, but to do that I need httpuv version 1.4.3 or higher. I tried updating it and I didn't get any error message, but when I try to install shiny it still says that I have httpuv 1.4.1. It's the same thing for all my packages, I go to update them, but after the updates are complete it's like nothing happened, I still have the same versions and they are still in the list of packages that need to be updated.

Here's what my console says during the updates:

> install.packages(c("boot", "cluster", "codetools", "foreign", "lattice", "MASS", "Matrix", "mgcv", "rpart", "survival"), lib="C:/Program Files/R/R-3.3.1/library")

  There are binary versions available but the source versions are later:
         binary source needs_compilation
foreign  0.8-69 0.8-71              TRUE
MASS     7.3-49 7.3-50              TRUE
mgcv     1.8-23 1.8-24              TRUE
survival 2.42-3 2.42-6              TRUE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/boot_1.3-20.zip'
Content type 'application/zip' length 592657 bytes (578 KB)
downloaded 578 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/cluster_2.0.7-1.zip'
Content type 'application/zip' length 549629 bytes (536 KB)
downloaded 536 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/codetools_0.2-15.zip'
Content type 'application/zip' length 46142 bytes (45 KB)
downloaded 45 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/foreign_0.8-69.zip'
Content type 'application/zip' length 305546 bytes (298 KB)
downloaded 298 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/lattice_0.20-35.zip'
Content type 'application/zip' length 739515 bytes (722 KB)
downloaded 722 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/MASS_7.3-49.zip'
Content type 'application/zip' length 1088841 bytes (1.0 MB)
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/Matrix_1.2-14.zip'
Content type 'application/zip' length 2824836 bytes (2.7 MB)
downloaded 2.7 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/mgcv_1.8-23.zip'
Content type 'application/zip' length 2421609 bytes (2.3 MB)
downloaded 2.3 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/rpart_4.1-13.zip'
Content type 'application/zip' length 925260 bytes (903 KB)
downloaded 903 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/survival_2.42-3.zip'
Content type 'application/zip' length 4396605 bytes (4.2 MB)
downloaded 4.2 MB

package ‘boot’ successfully unpacked and MD5 sums checked
package ‘cluster’ successfully unpacked and MD5 sums checked
package ‘codetools’ successfully unpacked and MD5 sums checked
package ‘foreign’ successfully unpacked and MD5 sums checked
package ‘lattice’ successfully unpacked and MD5 sums checked
package ‘MASS’ successfully unpacked and MD5 sums checked
package ‘Matrix’ successfully unpacked and MD5 sums checked
package ‘mgcv’ successfully unpacked and MD5 sums checked
package ‘rpart’ successfully unpacked and MD5 sums checked
package ‘survival’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\User1\AppData\Local\Temp\RtmpKgmKlo\downloaded_packages
> 
> install.packages(c("digest", "fansi", "foreign", "httpuv", "later", "MASS", "mgcv", "Rcpp", "rlang", "sourcetools", "survival", "utf8"))
Installing packages into ‘C:/Users/User1/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)

  There are binary versions available but the source versions are later:
             binary  source needs_compilation
digest       0.6.14  0.6.15              TRUE
fansi         0.2.2   0.2.3              TRUE
foreign      0.8-69  0.8-71              TRUE
httpuv        1.4.1   1.4.5              TRUE
later         0.7.1   0.7.3              TRUE
MASS         7.3-49  7.3-50              TRUE
mgcv         1.8-23  1.8-24              TRUE
Rcpp        0.12.16 0.12.18              TRUE
rlang         0.2.0   0.2.1              TRUE
sourcetools   0.1.6   0.1.7              TRUE
survival     2.42-3  2.42-6              TRUE
utf8          1.1.3   1.1.4              TRUE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/digest_0.6.14.zip'
Content type 'application/zip' length 173830 bytes (169 KB)
downloaded 169 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/fansi_0.2.2.zip'
Content type 'application/zip' length 141745 bytes (138 KB)
downloaded 138 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/foreign_0.8-69.zip'
Content type 'application/zip' length 305546 bytes (298 KB)
downloaded 298 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/httpuv_1.4.1.zip'
Content type 'application/zip' length 1118480 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/later_0.7.1.zip'
Content type 'application/zip' length 605749 bytes (591 KB)
downloaded 591 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/MASS_7.3-49.zip'
Content type 'application/zip' length 1088841 bytes (1.0 MB)
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/mgcv_1.8-23.zip'
Content type 'application/zip' length 2421609 bytes (2.3 MB)
downloaded 2.3 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/Rcpp_0.12.16.zip'
Content type 'application/zip' length 4358189 bytes (4.2 MB)
downloaded 4.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/rlang_0.2.0.zip'
Content type 'application/zip' length 754726 bytes (737 KB)
downloaded 737 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sourcetools_0.1.6.zip'
Content type 'application/zip' length 527805 bytes (515 KB)
downloaded 515 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/survival_2.42-3.zip'
Content type 'application/zip' length 4396605 bytes (4.2 MB)
downloaded 4.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/utf8_1.1.3.zip'
Content type 'application/zip' length 193991 bytes (189 KB)
downloaded 189 KB

package ‘digest’ successfully unpacked and MD5 sums checked
package ‘fansi’ successfully unpacked and MD5 sums checked
package ‘foreign’ successfully unpacked and MD5 sums checked
package ‘httpuv’ successfully unpacked and MD5 sums checked
package ‘later’ successfully unpacked and MD5 sums checked
package ‘MASS’ successfully unpacked and MD5 sums checked
package ‘mgcv’ successfully unpacked and MD5 sums checked
package ‘Rcpp’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘sourcetools’ successfully unpacked and MD5 sums checked
package ‘survival’ successfully unpacked and MD5 sums checked
package ‘utf8’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\User1\AppData\Local\Temp\RtmpKgmKlo\downloaded_packages
> install.packages(c("foreign", "MASS", "mgcv", "survival"), lib="C:/Program Files/R/R-3.3.1/library")

  There are binary versions available but the source versions are later:
         binary source needs_compilation
foreign  0.8-69 0.8-71              TRUE
MASS     7.3-49 7.3-50              TRUE
mgcv     1.8-23 1.8-24              TRUE
survival 2.42-3 2.42-6              TRUE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/foreign_0.8-69.zip'
Content type 'application/zip' length 305546 bytes (298 KB)
downloaded 298 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/MASS_7.3-49.zip'
Content type 'application/zip' length 1088841 bytes (1.0 MB)
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/mgcv_1.8-23.zip'
Content type 'application/zip' length 2421609 bytes (2.3 MB)
downloaded 2.3 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/survival_2.42-3.zip'
Content type 'application/zip' length 4396605 bytes (4.2 MB)
downloaded 4.2 MB

package ‘foreign’ successfully unpacked and MD5 sums checked
package ‘MASS’ successfully unpacked and MD5 sums checked
package ‘mgcv’ successfully unpacked and MD5 sums checked
package ‘survival’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\User1\AppData\Local\Temp\RtmpKgmKlo\downloaded_packages

#2

Hi! Welcome!

The latest version of these packages isn’t available as a pre-compiled binary for the version of R that you are using. That’s what this message means: “There are binary versions available but the source versions are later”. For instance, the latest binary of httpuv that’s available for your version of R is 1.4.1, even though the latest version on CRAN is 1.4.5.

Notice also that you keep getting the message “Binaries will be installed”. This is because all of these packages need compilation. Packages written only in R can be installed from source without compiling (since R is an interpreted language), but some packages have significant portions written in compiled languages (e.g. C, C++ Fortran). On Windows, R will never install from source unless explicitly forced to do so. This is because (unlike UNIX-alike systems) Windows doesn’t come with the necessary build-tools to compile packages and it is non-trivial to obtain them. So the upshot is that even though there are newer versions of these packages available on CRAN, right now you are limited to installing the older binary versions.

You seem to be running R 3.3.1, which is now two years (and two major versions) old. The longer you run an older version of R, the more likely it is that you will run into this situation. You've got two somewhat overlapping options here:

  1. Install the Rtools for Windows, which will allow you to compile packages from source. You will then need to call install.packages() with the parameter type = "source" to force installation of the latest versions.
  2. Upgrade to a newer version of R, for which it is more likely binaries will be available (but not guaranteed!)

#3

Well I feel a bit silly, never thought of updating R, just R studio, Thanks!


#4

Don’t feel too bad, it’s a common point of confusion! But yeah, since R and RStudio are separate software developed by different organizations, updating one doesn’t update the other. FYI, R has an annual release schedule these days, with a new major release in (approximately) the first quarter of the year, in case you want to mark your calendar :grin:


#5

Hi, please I have a similar issue. I am trying to update shiny to version 1.1 from 1.0. But after many downloads of the package via install.packages(shiny) I still get the same version 1.0. Could your solution work for me?


#6

It's really impossible to know without seeing the console output you get when running install.packages(shiny). Package installation can fail for many reasons!

In keeping with our community principle of keeping things tidy, let's continue this conversation over in the other topic you posted on this problem.


#7