renanxcortes / springerQuarantineBooksR

Download all books made available by Springer during the COVID-19 quarantine!
129 stars 41 forks source link

Failed installation because of "rlang" package #41

Closed AlyeskaBear closed 4 years ago

AlyeskaBear commented 4 years ago

I tried to install this package on a brand-new PC with the latest version of R just installed. I first installed the devtools package, and then ran the following code devtools::install_github("renanxcortes/springerQuarantineBooksR", force=T)

It returns the error message:

Error: Failed to install 'springerQuarantineBooksR' from GitHub:
(converted from warning) cannot remove prior installation of package ‘rlang’

It is a brand-new PC with freshly installed R. What can the problem? Thanks!

renanxcortes commented 4 years ago

Hi @AlyeskaBear , could you try reinstalling your rlang package? Restart your R session and try running:

install.packages('rlang')
AlyeskaBear commented 4 years ago

Hi @AlyeskaBear , could you try reinstalling your rlang package? Restart your R session and try running:

install.packages('rlang')

Yes, I did. But it still shows the same error message. Here is the complete history. The funny thing is after I ran the "install_github" function, the 'rlang' package I previously installed was gone. It also said "C:/rtools40 has been deleted". But I checked and no file in the folder was deleted.

So, it is really weird since my PC is brand-new..........

>  devtools::install_github("renanxcortes/springerQuarantineBooksR")
WARNING: Rtools is required to build R packages, but the version of Rtools previously installed in C:/rtools40 has been deleted.

Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/.
Downloading GitHub repo renanxcortes/springerQuarantineBooksR@master
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                          
2: CRAN packages only           
3: None                         
4: rlang (0.4.5 -> 0.4.6) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
1
rlang (0.4.5 -> 0.4.6) [CRAN]
Installing 1 packages: rlang
Installing package into ‘C:/Users/timlu/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
      binary source needs_compilation
rlang  0.4.5  0.4.6              TRUE

  Binaries will be installed
trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/rlang_0.4.5.zip'
Content type 'application/zip' length 1112530 bytes (1.1 MB)
downloaded 1.1 MB

package ‘rlang’ successfully unpacked and MD5 sums checked
Error: Failed to install 'springerQuarantineBooksR' from GitHub:
  (converted from warning) cannot remove prior installation of package ‘rlang’
> 
renanxcortes commented 4 years ago

Hm... Could you try selecting option "3" and not updating any package? Please let me know how it went.

AlyeskaBear commented 4 years ago

Hm... Could you try selecting option "3" and not updating any package? Please let me know how it went.

Yep, did it and got a different error message .

> devtools::install_github("renanxcortes/springerQuarantineBooksR")
WARNING: Rtools is required to build R packages, but the version of Rtools previously installed in C:/rtools40 has been deleted.

Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/.
Downloading GitHub repo renanxcortes/springerQuarantineBooksR@master
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                          
2: CRAN packages only           
3: None                         
4: rlang (0.4.5 -> 0.4.6) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
3
WARNING: Rtools is required to build R packages, but the version of Rtools previously installed in C:/rtools40 has been deleted.

Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/.

   checking for file 'C:\Users\timlu\AppData\Local\Temp\RtmpqYnfO1\remotes2a183541754b\renanxcortes-springerQuarantineBooksR-6278667/DESCRIPTION' ...

√  checking for file 'C:\Users\timlu\AppData\Local\Temp\RtmpqYnfO1\remotes2a183541754b\renanxcortes-springerQuarantineBooksR-6278667/DESCRIPTION'

-  preparing 'springerQuarantineBooksR':
   checking DESCRIPTION meta-information ...

   checking DESCRIPTION meta-information ... 

√  checking DESCRIPTION meta-information

-  checking for LF line-endings in source and make files and shell scripts

-  checking for empty or unneeded directories

-  building 'springerQuarantineBooksR_0.1.0.tar.gz'

Installing package into ‘C:/Users/timlu/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package 'springerQuarantineBooksR' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called 'tictoc'
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package 'springerQuarantineBooksR'
* removing 'C:/Users/timlu/Documents/R/win-library/4.0/springerQuarantineBooksR'
Error: Failed to install 'springerQuarantineBooksR' from GitHub:
  (converted from warning) installation of package ‘C:/Users/timlu/AppData/Local/Temp/RtmpqYnfO1/file2a18739f698b/springerQuarantineBooksR_0.1.0.tar.gz’ had non-zero exit status
>
renanxcortes commented 4 years ago

Ok, cool, try installing tictoc now and retry again. Try running:

install.packages('tictoc')
AlyeskaBear commented 4 years ago

Ok, cool, try installing tictoc now and retry again. Try running:

install.packages('tictoc')

Yes, it works! Thank you!

renanxcortes commented 4 years ago

Ok, cool, try installing tictoc now and retry again. Try running:

install.packages('tictoc')

Yes, it works! Thank you!

Nice! You're welcome!

indikasirimanna commented 4 years ago

Awesome Working thanks a lot :)