Tidyverse suddenly disappeared. Error when installing a new tidyverse package - r

My tidyverse package suddenly disappeared from my Rstudio showing error:
> library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
But I have been using it everyday! So I tried to install the package again. However, I received error and warning and couldn't install the package:
install.packages("tidyverse")
also installing the dependencies ‘lifecycle’, ‘tidyselect’, ‘rlang’, ‘cli’, ‘dplyr’, ‘vctrs’, ‘dbplyr’
There are binary versions available but the source versions are later:
binary source needs_compilation
lifecycle 1.0.1 1.0.3 FALSE
tidyselect 1.1.2 1.2.0 FALSE
rlang 1.0.2 1.0.6 TRUE
cli 3.2.0 3.4.1 TRUE
dplyr 1.0.8 1.0.10 TRUE
vctrs 0.4.0 0.5.0 TRUE
dbplyr 2.1.1 2.2.1 FALSE
tidyverse 1.3.1 1.3.2 FALSE
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘rlang’ 1.0.2 is being loaded, but >= 1.0.6 is required
ERROR: lazy loading failed for package ‘lifecycle’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/lifecycle’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/lifecycle’
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package ‘tidyselect’ ...
** package ‘tidyselect’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘rlang’ 1.0.2 is being loaded, but >= 1.0.4 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘tidyselect’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tidyselect’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tidyselect’
Warning in install.packages :
installation of package ‘tidyselect’ had non-zero exit status
* installing *source* package ‘dbplyr’ ...
** package ‘dbplyr’ successfully unpacked and MD5 sums checked
** 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]]) :
namespace ‘cli’ 3.2.0 is already loaded, but >= 3.3.0 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘dbplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/dbplyr’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/dbplyr’
Warning in install.packages :
installation of package ‘dbplyr’ had non-zero exit status
* installing *source* package ‘tidyverse’ ...
** package ‘tidyverse’ successfully unpacked and MD5 sums checked
** 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]]) :
namespace ‘lifecycle’ 1.0.0 is being loaded, but >= 1.0.1 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘tidyverse’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/0s/n2561n1s57q5k3tzwf28mqhc0000gn/T/RtmpQrdwuG/downloaded_packages’
What is wrong? The codes below did not work:
(I found on stack overflow as someone said it might work. Not sure the meaning of it.)
sudo apt-get install -y libxml2-dev libcurl4-openssl-dev libssl-dev
It just shows 'Error: unexpected symbol in "sudo apt"'.
Unable to install 'tidyverse'
Want to know how to sort it out

Related

Can't seem to install the "devtools" package

I need to install Devtools so i can download the 0.5.4 htmltools package from github, almost every package i try to install gives an error stating that the htmltools version i have is 0.5.2 but the package requires the 0.5.4 version, which i think is the github developers version, but i cant install devtools because it states this error message requiring for htmltools 0.5.4:
* installing *source* package 'bslib' ...
** package 'bslib' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'htmltools' 0.5.2 is being loaded, but >= 0.5.4 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'bslib'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/bslib'
Warning in install.packages :
installation of package ‘bslib’ had non-zero exit status
* installing *source* package 'callr' ...
** package 'callr' successfully unpacked and MD5 sums checked
** 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]]) :
namespace 'processx' 3.5.3 is being loaded, but >= 3.6.1 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'callr'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/callr'
* restoring previous 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/callr'
Warning in install.packages :
installation of package ‘callr’ had non-zero exit status
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 1.0.2 is being loaded, but >= 1.0.6 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/lifecycle'
* restoring previous 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/lifecycle'
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'pkgload' ...
** package 'pkgload' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 1.0.2 is being loaded, but >= 1.0.3 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'pkgload'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/pkgload'
Warning in install.packages :
installation of package ‘pkgload’ had non-zero exit status
* installing *source* package 'pkgbuild' ...
** package 'pkgbuild' successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'cli' 3.2.0 is being loaded, but >= 3.4.0 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'pkgbuild'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/pkgbuild'
Warning in install.packages :
installation of package ‘pkgbuild’ had non-zero exit status
ERROR: dependency 'bslib' is not available for package 'pkgdown'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/pkgdown'
Warning in install.packages :
installation of package ‘pkgdown’ had non-zero exit status
ERROR: dependencies 'pkgbuild', 'pkgdown', 'pkgload' are not available for package 'devtools'
* removing 'C:/Users/Rafael-PC/Documents/R/win-library/4.0/devtools'
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
tried to install htmltools via CRAN but the error persisted.
If you are using jupyter notebook for R try to install the devtools package in anaconda command prompt. Try this code install.packages("devtools") in anaconda prompt sometimes installing packages directly in notebook won't work and also check you R version is supported for devtools

Caret package not possible to install

I get this error on my Mac when I try to install caret with its dependencies:
ERROR: failed to lock directory ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library’ for modifying
Try removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/00LOCK-clock’
Warning in install.packages :
installation of package ‘clock’ had non-zero exit status
* installing *source* package ‘recipes’ ...
**
Paket ‘recipes’ erfolgreich entpackt und MD5 Summen überprüft
**
using staged installation
**
R
**
inst
**
byte-compile and prepare package for lazy loading
Fehler in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘lava’
Ruft auf: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Ausführung angehalten
ERROR: lazy loading failed for package ‘recipes’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/recipes’
Warning in install.packages :
installation of package ‘recipes’ had non-zero exit status
ERROR: dependency ‘recipes’ is not available for package ‘caret’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
Any ideas what the problem could be?
I already tried to update all R packages but it did not work

Errors lazy loading failed for package 'rgoogleads'

im trying to install the rgoogleads but i get this error
* installing *source* package 'rgoogleads' ...
** package 'rgoogleads' successfully unpacked and MD5 sums checked
** 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]]) :
namespace 'cli' 2.5.0 is being loaded, but >= 3.0.0 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'rgoogleads'
* removing 'C:/Users/jj/Documents/R/win-library/3.6/rgoogleads'
Warning in install.packages :
installation of package ‘rgoogleads’ had non-zero exit status
What do I need to do to avoid this error?

R studio: Installation of tidyverse gets me non zero exit for "reprex" and "tinytex"

Below is the message I get when I try to install tidyverse package and then I see tidyverse in the installed packages but I cannot use it ... what exactly is the issue here? I am using R version 3.6.0
* installing *source* package 'tinytex' ...
** package 'tinytex' successfully unpacked and MD5 sums checked
** 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]]) : namespace 'xfun' 0.22 is being loaded, but >= 0.23 is
required Calls: <Anonymous> ... namespaceImportFrom -> asNamespace ->
loadNamespace Execution halted ERROR: lazy loading failed for package
'tinytex'
* removing 'C:/Users/Owner/Documents/R/win-library/3.6/tinytex' Warning in install.packages : installation of package ‘tinytex’ had
non-zero exit status ERROR: dependency 'tinytex' is not available for
package 'rmarkdown'
* removing 'C:/Users/Owner/Documents/R/win-library/3.6/rmarkdown' Warning in install.packages : installation of package ‘rmarkdown’
had non-zero exit status ERROR: dependency 'rmarkdown' is not
available for package 'reprex'
* removing 'C:/Users/Owner/Documents/R/win-library/3.6/reprex' Warning in install.packages : installation of package ‘reprex’ had non-zero
exit status

Problem Downloading ggplot on Rstudio on a mac

I'm using a macbook and trying to download ggplot2 using
install.packages("ggplot2")
but the following error keep popping up
* installing *source* package ‘scales’ ...
** package ‘scales’ successfully unpacked and MD5 sums checked
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘colorspace’
ERROR: lazy loading failed for package ‘scales’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/scales’
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependency ‘scales’ is not available for package ‘ggplot2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/gr/_lps4tvd06gd53snb_q3kgn80000gn/T/Rtmp56qAqb/downloaded_packages’
Can anyone help me out with this?

Resources