RShiny installation ERROR: lazy loading failed for package 'shiny' - r

I am trying to install the Shiny package, and I am getting this error
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'httpuv' 1.4.1 is being loaded, but >= 1.4.4 is required
ERROR: lazy loading failed for package 'shiny'
* removing 'C:/Users/ikum/Documents/R/win-library/3.3/shiny'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\ikum\Documents\R\win-library\3.3" C:\Users\ikum\AppData\Local\Temp\RtmpcbANIA/downloaded_packages/shiny_1.2.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘shiny’ had non-zero exit status
Even when I try to download the latest version of httpuv using the targz file, it is still going to the 1.4.1 version. I deleted httpuv as well and reinstalled it manually as well as from the CRAN repository. Nothing seems to be working.
I also have the latest version or RStudio and R.
Is there a solution to this?

You can try to add type = "binary" argument:
install.packages("shiny", type ="binary")

Related

Trouble use library(agricolae)

I just updated the R version from 4.0.4 to 4.1.3.
I have successfully installed
install.packages("agricolae").
But, when I run the syntax
library(agricolae),
The output in RGUI shown:
Warning message: package ‘agricolae’ was built under R version 4.0.5.
Then, the output in RStudio shown:
Error: package or namespace load failed for ‘agricolae’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘magrittr’.
So, I tried to install the packages of "magrittr", but failed. The output in RStudio shown:
The system cannot find the path specified. make: \*\*\* \[pipe.o\] Error 1 ERROR: compilation failed for package 'magrittr'
* removing 'C:/Users/Anna/Documents/R/win-library/4.1/magrittr' Warning in install.packages : installation of package ‘magrittr’ had non-zero exit status\.
How can I install the package of agricolae?

Loading ggplot2 throwing the Error: package or namespace load failed .... there is no package called ‘colorspace’

I'm trying to run a different package that's dependent on ggplot2. When I load ggplot2 it gives me the error:
library(ggplot2) Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘colorspace’
I tried to install colorspace and I got this lovely error:
install.packages("colorspace") ERROR: compilation failed for package ‘colorspace’ Warning in install.packages : installation of package ‘colorspace’ had non-zero exit status'
So I tried installing it after downloading it from http://cran.r-project.org/web/packages/colorspace/index.html.
And that still didn't work.
I've also tried closing everything down and reinstalling ggplot2.
I updated R to
`R version 4.0.5 (2021-03-31) -- "Shake and Throw"
this morning.
Are you in windows, Mac or Linux? For windows users it’s necessary to install Rtools which deals with installing packages from binary. Mac and Linux users should not have this issue.
I have had the same problem today updating my R from 3.6.1 to 4.1 and this worked for me:
install.packages("colorspace")
and when R asks
Do you want to install from sources the package which needs compilation? (Yes/no/cancel)
type no

Attempting to install rmarkdown package gives me the error

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'xfun' 0.13 is being loaded, but >= 0.15 is required
ERROR: lazy loading failed for package 'knitr'
* removing 'C:/Users/mazen/Documents/R/win-library/3.5/knitr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
ERROR: dependency 'knitr' is not available for package 'rmarkdown'
* removing 'C:/Users/mazen/Documents/R/win-library/3.5/rmarkdown'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
You need to install a more recent version of xfun:
install.packages('xfun')
However, your R version is too old (3.5.x). With this old version of R, you don't have access to CRAN's prebuilt binary version of xfun. Your two choices are:
Either upgrade R;
or install Rtools.
Unless you are in a locked environment that prevents you from upgrading R, I strongly recommend that you upgrade R, instead of installing Rtools for an old version of R.

Error when installing rmarkdown

I have this error when trying to run install.packages("rmarkdown"). Can someone please let me know what's wrong?
installing source package 'rmarkdown' ...
** package 'rmarkdown' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no
package called 'backports' ERROR: lazy loading failed for package
'rmarkdown'
removing 'C:/Program Files/R/R-3.2.3/library/rmarkdown'
restoring previous 'C:/Program Files/R/R-3.2.3/library/rmarkdown' Warning in install.packages : running command
'"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" CMD INSTALL -l "C:\Program
Files\R\R-3.2.3\library"
C:\Users\knguyen\AppData\Local\Temp\Rtmp0KyOP9/downloaded_packages/rmarkdown_1.6.tar.gz'
had status 1 Warning in install.packages : installation of package
‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\knguyen\AppData\Local\Temp\Rtmp0KyOP9\downloaded_packages’
Blockquote
Try install the package backports as mentioned in the error.
Try installing the new R Version https://cran.r-project.org/bin/windows/base/old/3.4.3/.
I tried installing R markdown in my R studio, but it keeps looping to ask me to install the package. The R version on my R studio was version 1.1, and after I installed the new R Version, installing the R Markdown package was a success. Hopefully this could help.

Error Code with ggplot in R

I have uninstalled R and Rstudio. When I originally downloaded Rstudio the package was not listed in the packages section, so I downloaded and imported the zip file. There is no current version of R that is 3.3.0 that I can find-- my R version is 3.2.2. I have tried to install using the RGui as admin and I get the same error.
This is my error:
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck =
vI[[i]]) : there is no package called ‘gtable’ In addition: Warning
message: package ‘ggplot2’ was built under R version 3.3.0 Error:
package or namespace load failed for ‘ggplot2’
You are somehow executing R 3.3.0. No matter, though, you can simply invoke install.packages('ggplot2', repos='http://cran.rstudio.com', type='source') should sort you. If not, post a comment.

Resources