helping with installation of tidyverse package

Hello, I have met an installation problem related to tidyverse packages

when I use

install.packages("tidyverse")

I got success messages

Installing package into ‘C:/Users/amber/OneDrive/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tidyverse_1.3.0.zip'
Content type 'application/zip' length 440077 bytes (429 KB)
downloaded 429 KB

package ‘tidyverse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\amber\AppData\Local\Temp\RtmpqyXTol\downloaded_packages

then I try to use

library(tidyverse)

I received

Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘vctrs’

I thought the mean reason is vctrs packages, So I tried to install it

install.packages("vctrs")

but the result is

Installing package into ‘C:/Users/amber/OneDrive/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/vctrs_0.3.4.zip'
Warning in install.packages :
 cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/vctrs_0.3.4.zip': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
 cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/vctrs_0.3.4.zip'
Warning in install.packages :
 download of package ‘vctrs’ failed

I have checked the website https://cran.rstudio.com/bin/windows/contrib/4.0 do not have vctrs package
I wonder what should I do?

1 Like

Hi,

I tried to (re)install the package too and discovered it's indeed unavailable. If you look at the CRAN website for the package you can see it says r-release: not available. I think this is an error, but I'm not sure.

I suggest you install the developer version from GitHub meanwhile and hopefully this fixes your issue:

# install.packages("devtools")
devtools::install_github("r-lib/vctrs")

PJ

PS: I opened an issue on the GitHub page to let them know

Hello!
I have the same issue today with other packages (it doesn't only affect tidyverse but a lot more).
I have tried to install the developer version from GitHub but I get another error, see error below:

devtools::install_github("r-lib/vctrs")
Downloading GitHub repo r-lib/vctrs@HEAD
√ checking for file 'C:\Users\rodrigul\AppData\Local\Temp\RtmpQfEc5N\remotes20385ac38e7\r-lib-vctrs-006af2e/DESCRIPTION' ...

  • preparing 'vctrs': (2.7s)
    √ checking DESCRIPTION meta-information ...
  • cleaning src
  • installing the package to process help pages (661ms)
    -----------------------------------
  • installing source package 'vctrs' ...
    ** using staged installation
    ** libs
    "c:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c altrep-rle.c -o altrep-rle.o
    sh: c:/rtools40/mingw64/bin/gcc: No such file or directory
    make: *** [C:/PROGRA~1/R/R-40~1.2/etc/x64/Makeconf:222: altrep-rle.o] Error 127
    ERROR: compilation failed for package 'vctrs'
  • removing 'C:/Users/rodrigul/AppData/Local/Temp/RtmpWEbs1x/Rinstc58218f1365/vctrs'
    -----------------------------------
    ERROR: package installation failed
    Error: Failed to install 'vctrs' from GitHub:
    System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
    E> * installing source package 'vctrs' ...
    E> ** using staged installation
    E> ** libs
    E> "c:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA~1/R/R-40~1.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c altrep-rle.c -o altrep-rle.o
    E> sh: c:/rtools40/mingw64/bin/gcc: No such file or directory
    E> make: *** [C:/PROGRA~1/R/R-40~1.2/etc/x64/Makeconf:222: altrep-rle.o] Error 127
    E> ERROR: compilation failed for package 'vctrs'
    E> * removing 'C:/Users/rodrigul/AppData/Local/Temp/RtmpWEbs1x/Rinstc58218f1365/vctrs'
    E> -----------------------------------
    E> ERROR: package installation failed

Thanks for your help!

The windows binary does not seem available on CRAN indeed.

In the meantime, you can install from source.
You must install Rtools for that: https://cran.r-project.org/bin/windows/Rtools/ (you may get the issue about github installation for that if you don't have rtools)

install.packages("vctrs", type = "source")

Or maybe easier: You can install from package manager

install.packages("vctrs", repos = "https://packagemanager.rstudio.com/cran/latest")

it seems they have the binary available there.

2 Likes

Thank you so much, it seems to work! :slight_smile:

1 Like

Hello,

Thanks very much for your help. I tried

install.packages("vctrs", repos = "https://packagemanager.rstudio.com/cran/latest")

as people suggested on Github. Now it's been solved.
thanks for your help!

Hello,
I am new to the R, but if you have the problem of installing vctrs package, you may try the solution

install.packages("vctrs", repos = "https://packagemanager.rstudio.com/cran/latest")

as suggested on Github and by cderv.
It works for me.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.