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?
Related
I'm trying to install "brms" package but keep getting an error.
First, I installed "brms" package, and then call the package from the library.
I'm getting the following error message. "Error in library(brms) : there is no package called ‘brms’
Can someone help me?
install.packages("brms")
Installing package into ‘C:/Users/.......’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is
later:
binary source needs_compilation
brms 2.17.0 2.18.0 FALSE
installing the source package ‘brms’
trying URL 'https://cran.rstudio.com/src/contrib/brms_2.18.0.tar.gz'
Content type 'application/x-gzip' length 4486548 bytes (4.3 MB)
downloaded 4.3 MB
* installing *source* package 'brms' ...
** package 'brms' successfully unpacked and MD5 sums checked
** using staged installation
** R
Warning: namespace 'brms' is not available and has been replaced
by .GlobalEnv when processing object 'brmsfit_example1'
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Warning message:
package 'Rcpp' was built under R version 4.0.5
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'Brobdingnag'
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package 'brms'
* removing 'C:/Users/....'
Warning in install.packages :
installation of package ‘brms’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\....\downloaded_packages’
library(brms)
Error in library(brms) : there is no package called ‘brms’
In that case, you probably didn't let the 'install' step finish. That package has a lot of dependencies. Try install.packages("brms") again and wait for it to finish.
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
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
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
I started to get some error message in R when calling libraries that usually work very well. I decided to re-install the packages that were concerned, and also ran into some error..
Any idea what's going on? I'm about to throw my computer thru the window..
> library( "DESeq2" )
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘plyr’
Error: package or namespace load failed for ‘DESeq2’
> install.packages("plyr_1.8.2.tar.gz", repos = NULL, type="source")
Installing package into ‘C:/Users/Sun/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
* installing *source* package 'plyr' ...
** package 'plyr' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.0/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="plyr.dll" OBJECTS="RcppExports.o loop-apply.o split-numeric.o"' had status 127
ERROR: compilation failed for package 'plyr'
* removing 'C:/Users/Sun/Documents/R/win-library/3.2/plyr'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Sun\Documents\R\win-library\3.2" "plyr_1.8.2.tar.gz"' had status 1
2: In install.packages("plyr_1.8.2.tar.gz", repos = NULL, type = "source") :
installation of package ‘plyr_1.8.2.tar.gz’ had non-zero exit status
Thanks to Joran, installing from CRAN actually solved the issue.
install.packages("plyr")