Error in installing packages 'stringr', 'reshape2', and 'ggplot2', and 'rattle' on mac - r

I am not a Mac user, but I am trying to help some students to install rattle on their Mac systems. I suggest them to follow zhiyzuo post, which is based on Yihui’s comment. But they get the following errors, although 'brew' is installed on their system:
* installing *source* package ‘stringr’ ...
** package ‘stringr’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in library.dynam(lib, package, package.lib) :
shared object ‘stringi.so’ not found
ERROR: lazy loading failed for package ‘stringr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/stringr’
Warning in install.packages :
installation of package ‘stringr’ had non-zero exit status
ERROR: dependency ‘stringr’ is not available for package ‘reshape2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/reshape2’
Warning in install.packages :
installation of package ‘reshape2’ had non-zero exit status
ERROR: dependency ‘reshape2’ 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
ERROR: dependencies ‘ggplot2’, ‘stringr’ are not available for package ‘rattle’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rattle’
Warning in install.packages :
installation of package ‘rattle’ had non-zero exit status

Related

clang error trying to install R package `ivreg` on mac

I am attempting to install the ivreg package into R (4.0.3) on my Mac (OS Big Sur Intel Version 11.6.8)
I am having what apparently is a fairly common problem installing its dependencies, but I am receiving a slightly different error message. My error message from the command install.packages('ivreg'):
clang: error: -E or -x required when input is from standard input
clang: error: no such file or directory: 'L/usr/local/gfortran/lib'
make: *** [Matrix.so] Error 1
ERROR: compilation failed for package ‘Matrix’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Matrix’
* restoring previous
‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Matrix’
Warning in install.packages :
installation of package ‘Matrix’ had non-zero exit status
* installing *source* package ‘MatrixModels’ ...
** package ‘MatrixModels’ 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 ‘Matrix’ 1.2-18 is being loaded, but >= 1.4.2 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘MatrixModels’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/MatrixModels’
Warning in install.packages :
installation of package ‘MatrixModels’ had non-zero exit status
ERROR: dependency ‘MatrixModels’ is not available for package ‘quantreg’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/quantreg’
Warning in install.packages :
installation of package ‘quantreg’ had non-zero exit status
ERROR: dependency ‘quantreg’ is not available for package ‘car’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/car’
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
The instrumental bit appears to be the very first two lines, where it's describing something about a gfortran directory. I've tried to install gfortran as well as all of the other dependencies to no avail. When I attempt to do so, I'm told that the packages are unavailable for my version of R.
QUESTION: Is there a way to alleviate this error and install ivreg on my machine?

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

Installing factoextra package in R

I am using R version >3.5. I want to install factoextra package on R studio (I use Mac). I tried to install the package directly with dependencies = TRUE, and I also tried to install the dependencies packages one by one. Neither worked.
Here is the error message: (* represents the user on my computer).
* installing *source* package ‘quantreg’ ...
** package ‘quantreg’ successfully unpacked and MD5 sums checked
** libs
/Users/*/.R/Makevars:2: *** missing separator. Stop.
ERROR: compilation failed for package ‘quantreg’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/quantreg’
* installing *source* package ‘mclust’ ...
** package ‘mclust’ successfully unpacked and MD5 sums checked
** libs
/Users/*/.R/Makevars:2: *** missing separator. Stop.
ERROR: compilation failed for package ‘mclust’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/mclust’
ERROR: dependencies ‘pbkrtest’, ‘quantreg’ are not available for package ‘car’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/car’
ERROR: dependency ‘car’ is not available for package ‘rstatix’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rstatix’
ERROR: dependency ‘rstatix’ is not available for package ‘ggpubr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ggpubr’
ERROR: dependency ‘ggpubr’ is not available for package ‘factoextra’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/factoextra’
The downloaded source packages are in:
‘/private/var/folders/8v/mfj4t9t54y72cdrz6q84jnjh0000gn/T/RtmpfEwO54/downloaded_packages’
Warning messages:
1: In install.packages("factoextra", dependencies = TRUE) :
installation of package ‘quantreg’ had non-zero exit status
2: In install.packages("factoextra", dependencies = TRUE) :
installation of package ‘mclust’ had non-zero exit status
3: In install.packages("factoextra", dependencies = TRUE) :
installation of package ‘car’ had non-zero exit status
4: In install.packages("factoextra", dependencies = TRUE) :
installation of package ‘rstatix’ had non-zero exit status
5: In install.packages("factoextra", dependencies = TRUE) :
installation of package ‘ggpubr’ had non-zero exit status
6: In install.packages("factoextra", dependencies = TRUE) :
installation of package ‘factoextra’ had non-zero exit status
any help would be greatly appreciated!!
R packages come in two shapes: as pre-compiled binaries, and as source code. In your case, it seems that the compilation of mclust and quantreg failed, as suggested by the error message
Stop. ERROR: compilation failed for package ‘mclust’
Stop. ERROR: compilation failed for package ‘quantreg’
You could try to force install them from binary by running: install.packages("mclust", type = "binary") and install.packages("quantreg", type = "binary")

R - Why can I not install devtools and neither some of its dependencies?

I am trying to install devtools and I think the problem is with its dependencies. I also tried to singularly install processx but I got still error. Thank you so much.
* installing *source* package ‘processx’ ...
** package ‘processx’ successfully unpacked and MD5 sums checked
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘processx’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/processx’
Warning in install.packages :
installation of package ‘processx’ had non-zero exit status
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2019c.1.0/zoneinfo/Asia/Bangkok'
* installing *source* package ‘usethis’ ...
** package ‘usethis’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘fs’ 1.2.7 is being loaded, but >= 1.3.0 is required
ERROR: lazy loading failed for package ‘usethis’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/usethis’
Warning in install.packages :
installation of package ‘usethis’ had non-zero exit status
ERROR: dependency ‘processx’ is not available for package ‘callr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/callr’
Warning in install.packages :
installation of package ‘callr’ had non-zero exit status
ERROR: dependency ‘callr’ is not available for package ‘pkgbuild’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/pkgbuild’
Warning in install.packages :
installation of package ‘pkgbuild’ had non-zero exit status
ERROR: dependencies ‘callr’, ‘pkgbuild’ are not available for package ‘rcmdcheck’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rcmdcheck’
Warning in install.packages :
installation of package ‘rcmdcheck’ had non-zero exit status
ERROR: dependencies ‘usethis’, ‘callr’, ‘pkgbuild’, ‘rcmdcheck’ are not available for package ‘devtools’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/75/5wf3rrn96jj16b19vf_5j_600000gn/T/RtmpTQ6FNv/downloaded_packages’

Receiving "package had non-zero exit status" when installing packages on campus Rstudio server?

I'm trying to install ggplot2 on my campus' Rstudio server. Unfortunately I receive the classic "installation of package 'ggplot2' had non-zero exit status." I've looked through the many threads of users who've had the same problem with other packages, but haven't found any workable solutions.
I've tried using install.packages("ggplot2", dependencies = TRUE), which hasn't worked.
Also, I'm running the most recent version of OSX on a MacBook Pro.
This is the error message I receive:
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/mnt/trafficstop/jrleary/R/x86_64-redhat-linux-gnu-library/3.5/vctrs’
Warning in install.packages :
installation of package ‘vctrs’ had non-zero exit status
ERROR: dependency ‘vctrs’ is not available for package ‘pillar’
* removing ‘/mnt/trafficstop/jrleary/R/x86_64-redhat-linux-gnu-library/3.5/pillar’
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
ERROR: dependency ‘pillar’ is not available for package ‘tibble’
* removing ‘/mnt/trafficstop/jrleary/R/x86_64-redhat-linux-gnu-library/3.5/tibble’
Warning in install.packages :
installation of package ‘tibble’ had non-zero exit status
ERROR: dependency ‘tibble’ is not available for package ‘ggplot2’
* removing ‘/mnt/trafficstop/jrleary/R/x86_64-redhat-linux-gnu-library/3.5/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status

Resources