Problem installing tidyverse in R 3.6.2 - no jsonlite - r

I am trying to install tidyverse after updating R for mac. I am using Mac OS Catalina 10.15.2
When installing, I get the following error message:
* installing *source* package ‘jsonlite’ ...
** package ‘jsonlite’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘jsonlite’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/jsonlite’
Warning in install.packages :
installation of package ‘jsonlite’ had non-zero exit status
And when trying to load tidyverse. I get the following error message:
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘jsonlite’
I tried to install jsonlite as a seperate package, first uninstalling tidyverse, but got this error message:
package ‘json’ is not available (for R version 3.6.2)
Now at a bit of an impasse. Anyone know how to resolve this issue

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?

Error while attempting to install "tidyverse" to RStudio on MacOS Catalina Version 10.15.4

I have been attempting to download tidyverse all day with no luck. I am a newbie, but have searched for all sorts of remedies and nothing's done the trick yet. This is the initial error message I receive:
> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘colorspace’
Upon attempting to install colorspace I receive:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘colorspace’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/colorspace’
Warning in install.packages :
installation of package ‘colorspace’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/f9/rwtzxt9j7218k7k5vy3r03zm0000gn/T/RtmpFYYSDK/downloaded_packages’
No idea what to do about this, am happy to provide more info. Installing directly from the packages tab is also not working.

Unable to install tidyverse in R

I am fairly new to R and just updated to R 4.0
When installing tidyverse I see this:
There is a binary version available but the source version
is later:
binary source needs_compilation
broom 0.5.5 0.5.6 FALSE
package ‘tidyverse’ successfully unpacked and MD5 sums checked
"suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE))
tools:::makeLazyLoading("broom", '"
Execution halted
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/Chris' PC/Documents/R/win-library/4.0/broom'
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
Then when trying to load this package
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘broom’
I tried independently installing broom to no avail:
> install.packages("broom")
There is a binary version available but the source version
is later:
binary source needs_compilation
broom 0.5.5 0.5.6 FALSE
installing the source package ‘broom’
Error: unexpected string constant in:
"suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE))
tools:::makeLazyLoading("broom", '"
Execution halted
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/Chris' PC/Documents/R/win-library/4.0/broom'
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
Any thoughts on how to clear up this issue?

failed to update Rmarkdown version

I failed to load library(DataExplorer) because it says my Rmarkdown version is too old. but when I updated my Rmarkdown version, I got another error saying 'Rcpp' has non-zero exit status. I tried to remove 'Rcpp' but it says it does not exist.
> library(DataExplorer)
Error: package or namespace load failed for ‘DataExplorer’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rmarkdown’ 1.8 is already loaded, but >= 1.10 is required
> install_version('rmarkdown', version = '1.10')
Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/rmarkdown/rmarkdown_1.10.tar.gz
Installing 1 packages: Rcpp
trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_1.0.2.tar.gz'
Content type 'application/x-gzip' length 3699570 bytes (3.5 MB)
downloaded 3.5 MB
* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
** using staged installation
** libs
*** arch - i386
Error in system(cmd) : (converted from warning) 'make' not found
* removing 'C:/Users/qjia/Documents/R/R-3.6.1/library/Rcpp'
Error: Failed to install 'unknown package' from URL:
(converted from warning) installation of package ‘Rcpp’ had non-zero exit status
> remove.packages("Rcpp")
Removing package from ‘C:/Users/qjia/Documents/R/R-3.6.1/library’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘Rcpp’
to load DataExplorer sucessfully.

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.

Resources