Error with installing tidyverse using R35 in linux? - r

I need to install this package into R 3.5 so I can submit an R script that was created on that version. I have to do this via linux. After typing R35, I run install.packages('tidyverse') and get the folloing error:
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘vctrs’ 0.3.6 is being loaded, but >= 0.3.7 is required
ERROR: lazy loading failed for package ‘tidyr’
* removing ‘/ua/jwlorge/R/x86_64-pc-linux-gnu-library/3.5/tidyr’
ERROR: dependency ‘dtplyr’ is not available for package ‘tidyverse’
* removing ‘/ua/jwlorge/R/x86_64-pc-linux-gnu-library/3.5/tidyverse’
The downloaded source packages are in
‘/tmp/RtmpAHxP3R/downloaded_packages’
Warning messages:
1: In install.packages("tidyverse") :
installation of package ‘vctrs’ had non-zero exit status
2: In install.packages("tidyverse") :
installation of package ‘ellipsis’ had non-zero exit status
3: In install.packages("tidyverse") :
installation of package ‘hms’ had non-zero exit status
4: In install.packages("tidyverse") :
installation of package ‘pillar’ had non-zero exit status
5: In install.packages("tidyverse") :
installation of package ‘tibble’ had non-zero exit status
6: In install.packages("tidyverse") :
installation of package ‘dplyr’ had non-zero exit status
7: In install.packages("tidyverse") :
installation of package ‘dbplyr’ had non-zero exit status
8: In install.packages("tidyverse") :
installation of package ‘dtplyr’ had non-zero exit status
9: In install.packages("tidyverse") :
installation of package ‘tidyr’ had non-zero exit status
10: In install.packages("tidyverse") :
installation of package ‘tidyverse’ had non-zero exit status
I searched online and found other people who had this problem but none of the suggestions worked. I tried updating vctrs and rlang. This is the error I get when I try to re-install vctrs:
Error : .onLoad failed in loadNamespace() for 'rlang', details:
call: NULL
error: 'is_character' is not an exported object from 'namespace:rlang'
ERROR: lazy loading failed for package ‘vctrs’
* removing ‘/ua/jwlorge/R/x86_64-pc-linux-gnu-library/3.5/vctrs’
Re-installing rlang was successful but didn't solve the problem. I also found online that re-starting R solves the problem, but I am using linux and I am a bit new to it. I don't know how you would restart R35 in linux.
I have tidyverse succesfully installed in in another version but not in 3.5. Does anyone have an idea what is causing this issue? Thanks!

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?

Deploy R on Azure on Linux (centos 8.2.2004)

I am trying to install R Shiny on Azure , Linux (centos 8.2.2004). Using the manual : https://linuxize.com/post/how-to-install-r-on-centos-7/
However I can not install packages. I receive error :
"ERROR: failed to lock directory ‘/usr/lib64/R/library’ for modifying Try removing ‘/usr/lib64/R/library/00LOCK-Rcpp’ ERROR: dependency ‘Rcpp’ is not available for package ‘later’
* removing ‘/usr/lib64/R/library/later’ ERROR: dependencies ‘Rcpp’, ‘later’ are not available for package ‘promises’
* removing ‘/usr/lib64/R/library/promises’ ERROR: dependencies ‘Rcpp’, ‘promises’, ‘later’ are not available for package ‘httpuv’
* removing ‘/usr/lib64/R/library/httpuv’ ERROR: dependencies ‘httpuv’, ‘later’, ‘promises’ are not available for package ‘shiny’
* removing ‘/usr/lib64/R/library/shiny’
The downloaded source packages are in
‘/tmp/RtmpGIfMqF/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning messages: 1: In install.packages("shiny") : installation of package ‘Rcpp’ had non-zero exit status 2: In install.packages("shiny") : installation of package ‘later’ had non-zero exit status 3: In install.packages("shiny") : installation of package ‘promises’ had non-zero exit status 4: In install.packages("shiny") : installation of package ‘httpuv’ had non-zero exit status 5: In install.packages("shiny") : installation of package ‘shiny’ had non-zero exit status"
I have tried to fix the issue however , was able. If you have some ideas, please advice, thanks.
I solved the problem finally. There was necessary to delete the folder :
sudo rm -rf /usr/lib64/R/library/00LOCK-Rcpp
Then tried instal shiny package again and worked fine.

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

Trouble installing "car" package in R.

I had used this to try to install the car package:
install.packages("car", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
but received this error:
ERROR: dependency ‘openxlsx’ is not available for package ‘rio’
* removing ‘/home/dan-laptop/R/x86_64-pc-linux-gnu-library/3.2/rio’
Warning in install.packages :
installation of package ‘rio’ had non-zero exit status
ERROR: dependency ‘rio’ is not available for package ‘car’
* removing ‘/home/dan-laptop/R/x86_64-pc-linux-gnu-library/3.2/car’
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
ERROR: dependency ‘car’ is not available for package ‘alr4’
* removing ‘/home/dan-laptop/R/x86_64-pc-linux-gnu-library/3.2/alr4’
Warning in install.packages :
installation of package ‘alr4’ had non-zero exit status
I tried installing the dependencies individually with no luck. Any help would be greatly appreciated. Thanks.

installation of package ‘ggvis’ had non-zero exit status

I'm on Ubuntu 12.04.5 and have R v.3.1.3 installed.
I'm using the command
install.packages("ggvis")
And that yields
ERROR: dependency ‘mime’ is not available for package ‘shiny’
* removing ‘/home/milia/R/x86_64-pc-linux-gnu-library/3.1/shiny’
ERROR: dependency ‘shiny’ is not available for package ‘ggvis’
* removing ‘/home/milia/R/x86_64-pc-linux-gnu-library/3.1/ggvis’
The downloaded source packages are in
‘/tmp/Rtmp6Cz9En/downloaded_packages’
Warning messages:
1: In install.packages("ggvis") :
installation of package ‘shiny’ had non-zero exit status
2: In install.packages("ggvis") :
installation of package ‘ggvis’ had non-zero exit status
So I figured I had to install shiny first. So I typed
install.packages("shiny")
Which gave:
ERROR: dependency ‘mime’ is not available for package ‘shiny’
* removing ‘/home/milia/R/x86_64-pc-linux-gnu-library/3.1/shiny’
The downloaded source packages are in
‘/tmp/Rtmp6Cz9En/downloaded_packages’
Warning message:
In install.packages("shiny") :
installation of package ‘shiny’ had non-zero exit status
So I thought installing mime.
Did as usual
install.packages("mime")
Which gave
Warning message:
In install.packages("mime") :
installation of package ‘mime’ had non-zero exit status
I'm not sure what to do next, and the similar problems in stack with a non-zero exit status didn't help much.
My Rprofile can be found here.

Resources