Cannot install dplyr in a R 3.2.1 version. I tried everything, I downloaded a previous version of dplyr in the laptop (0.4.2), I tried from other mirrors, but still cannot get it installed. The same with "tidyverse"
When I try it locally it says:
installing source package ‘dplyr’ ...
** package ‘dplyr’ successfully unpacked and MD5 sums checked
** libs sh: make: command not found ERROR: compilation failed for package ‘dplyr’
removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/dplyr’
restoring previous ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/dplyr’
Warning in install.packages : installation of package
‘/Users/x/Desktop/Master/R/dplyr_0.4.0.tar.gz’ had non-zero exit statu
That's the local error.
The online version of installing it says
it cannot be installed
my sessioninfo
R version 3.2.1 (2015-06-18) Platform: x86_64-apple-darwin10.8.0 (64-bit) Running under: OS X 10.8.5 (Mountain Lion) locale: [1] es_ES.UTF-8/es_ES.UTF-8/es_ES.UTF-8/C/es_ES.UTF-8/es_ES.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] remotes_2.0.4 loaded via a namespace (and not attached): [1] httr_1.4.0 R6_2.4.0 tools_3.2.1 RCurl_1.95-4.8 digest_0.6.10 bitops_1.0-6
Thanks!
Related
I am pretty desperate to install.packages("devtools").
However it allways fails with this error
Error: .onLoad failed in loadNamespace() for 'pkgload', details:
call: readRDS(nsInfoFilePath)
error: error reading from connection
Execution halted
ERROR: lazy loading failed for package ‘devtools’
* removing ‘/home/bjoern/R/x86_64-pc-linux-gnu-library/3.6/devtools’
Things I tried to fix this:
Add the dependencies = T argument
Following a suggestion by hadley wickham on github -> update rlang package
Try to run install.packages("pkgload") resulting in nearly exactly the same error (see below)
Completely removing R and reinstalling it
Additionally installing package following packages:
r-base-dev
r-cran-devtools
r-recommended
Updated all packages update.packages(ask = FALSE, checkBuilt = TRUE)
Error of install.packages("pkgload")
Error: package or namespace load failed for ‘pkgload’:
.onLoad failed in loadNamespace() for 'pkgload', details:
call: readRDS(nsInfoFilePath)
error: error reading from connection
Error: loading failed
Execution halted
ERROR: loading failed
I digged even deeper to the pkgload (which at least I hope is the only reason for the problem). I will check if manually (re)installing all imports and suggests from the CRAN page of pkgload does solve it.
Imports: desc, methods, pkgbuild, rlang, rprojroot, rstudioapi,
utils, withr Suggests: bitops, covr, Rcpp, testthat
My sessionInfo() output:
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=de_DE.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3
I still refuse to belief that it is impossibe to install devtools on ubuntu20
However at this point I take any straw
Solution Edit:
In short what fixed the issue for me was installing testthat package before. Thanks to comment by rui-barradas
install.packages("testthat")
install.packages("pkgload")
install.packages("devtools")
I am also on Ubuntu 20.04 but running R 4.0.0.
When trying to install a package, if it depends on another that was installed prior to R 4.0.0 I get an error message and the installation fails. This happens even if I set dependencies = TRUE in the call to install.packages.
Example: The command was
install.packages('pkgload')
I omit the first output lines, saying that the file was downloaded. Then, the relevant part.
installing source package ‘pkgload’ ...
** package ‘rcmdcheck’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading Error: package ‘testthat’ was installed before R 4.0.0: please re-install it
Execution halted ERROR: lazy loading failed for package ‘pkgload’
removing ‘/usr/local/lib/R/site-library/pkgload’
restoring previous ‘/usr/local/lib/R/site-library/pkgload’ Warning in install.packages : installation of package ‘pkgload’ had
non-zero exit status The downloaded source packages are in
‘/tmp/RtmpVxpbs0/downloaded_packages’
Correct way.
The right way of installing package pkgload was to run the sequence
install.packages('testthat')
install.packages('pkgload')
and the problem was solved.
Note that with other packages, it already happened to see this be a recursive issue. Imagine that package testthat depended (which it does not) on another package installed prior to R 4.0.0.
Annoying but solvable.
sessionInfo()
#R version 4.0.0 (2020-04-24)
#Platform: x86_64-pc-linux-gnu (64-bit)
#Running under: Ubuntu 20.04 LTS
#
#Matrix products: default
#BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
#LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
#
#locale:
# [1] LC_CTYPE=pt_PT.UTF-8 LC_NUMERIC=C
#[3] LC_TIME=pt_PT.UTF-8 LC_COLLATE=pt_PT.UTF-8
# [5] LC_MONETARY=pt_PT.UTF-8 LC_MESSAGES=pt_PT.UTF-8
# [7] LC_PAPER=pt_PT.UTF-8 LC_NAME=C
# [9] LC_ADDRESS=C LC_TELEPHONE=C
#[11] LC_MEASUREMENT=pt_PT.UTF-8 LC_IDENTIFICATION=C
#
#attached base packages:
#[1] stats graphics grDevices utils datasets
#[6] methods base
#
#other attached packages:
#[1] rvest_0.3.5 xml2_1.3.2 data.table_1.12.8
#
#loaded via a namespace (and not attached):
I had the same problems, and the solution was, at least in my case, Ubuntu 20.04.1 LTS (Focal Fossa) + R 4.0.2:
First (from terminal), install:
Step 1: sudo apt-get update -y
Step 2: sudo apt-get install -y libxml2-dev
Then from RStudio (setRepositories first, and choose 8 repositories) and install both packages:
Install xml2 package
install devtools
And works for me.
I am trying to update the dplyr package to resolve a problem with rlang, following relevant advice in the web.
First I removed the previous installation of dplyr with the remove.packages() command.
Then I restarted R Studio.
Here is the remaining of the story:
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
[...]
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RevoUtilsMath_10.0.0 RevoUtils_10.0.5 RevoMods_11.0.0 MicrosoftML_1.5.0 mrsdeploy_1.1.2
[6] RevoScaleR_9.2.1 lattice_0.20-35 rpart_4.1-11
loaded via a namespace (and not attached):
[1] codetools_0.2-15 CompatibilityAPI_1.1.0 foreach_1.4.4 grid_3.4.1 R6_2.2.2
[6] jsonlite_1.5 curl_2.6 iterators_1.0.8 tools_3.4.1 yaml_2.1.14
[11] compiler_3.4.1 mrupdate_1.0.1
> library(dplyr)
Error in library(dplyr) : there is no package called ‘dplyr’
> install.packages('dplyr', dependencies = TRUE)
Installing package into ‘C:/Users/Alienware/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://mran.microsoft.com/snapshot/2017-09-01/bin/windows/contrib/3.4/dplyr_0.7.2.zip'
Content type 'application/zip' length 2881528 bytes (2.7 MB)
downloaded 2.7 MB
package ‘dplyr’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘dplyr’
The downloaded binary packages are in
C:\Users\Alienware\AppData\Local\Temp\RtmpucBaSk\downloaded_packages
> library(dplyr)
Error in library(dplyr) : there is no package called ‘dplyr’
Go to your R library path (where your packages are stored):
C:\Users\username\Documents\R\win-library\3.5
You can refer to this guide on how to find your R library path.
Next, simply search for dplyr in your folder and delete it. I find that this manual method works for me as opposed to removing packaging via Rstudio. Hope it helps!
I am trying to install matrixStats package in R. The command I have used is:
install.packages("matrixStas", dependencies = TRUE)
This command produces the following error:
* installing *source* package ‘colorspace’ ...
** package ‘colorspace’ successfully unpacked and MD5 sums checked
** libs
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘colorspace’ in
library.dynam(lib, package, package.lib):shared object ‘colorspace.so’
not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/colorspace’
I have tried uninstalling and reinstalling R (twice),Updating packages,tried installing the packages from linux commandline as well. Then I installed Rstudio and tried installing packages using that which in turn gave the same problem. Nothing seems to help. I have tried installing other packages as well and they all end up showing the same error.
I am using R version 3.4.2
sessionInfo:
R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_IN LC_NUMERIC=C LC_TIME=en_IN
[4] LC_COLLATE=en_IN LC_MONETARY=en_IN LC_MESSAGES=en_IN
[7] LC_PAPER=en_IN LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_IN LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.2
Any suggestions from your end would be a great help for me
I am trying to install the RWeka package.
install.packages("RWeka")
When I do this I get the following errors.
** package ‘RWeka’ successfully unpacked and MD5 sums checked
Need at least Java version 1.7/7.0.
ERROR: configuration failed for package ‘RWeka’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RWeka’
Warning in install.packages :
installation of package ‘RWeka’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/qq/lyrzyp0119x1zmld972mbfz00000gn/T/Rtmp9xnRxx/downloaded_packages’
I have tried updating/altering Java but that does not seem to be the problem
Here is the session info:
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.6 (El Capitan)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] rsconnect_0.4.3 tools_3.3.1
Trying to install package "caret" on R 3.1.0 (Ubuntu 14.04.01 LTS) and running into a build error.
> install.packages('caret')
[...]
* installing *source* package ‘BradleyTerry2’ ...
** package ‘BradleyTerry2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error : object ‘brglm’ is not exported by 'namespace:brglm'
ERROR: lazy loading failed for package ‘BradleyTerry2’
* removing ‘/home/br00t/R/x86_64-pc-linux-gnu-library/3.1/BradleyTerry2’
Warning in install.packages :
installation of package ‘BradleyTerry2’ had non-zero exit status
ERROR: dependency ‘BradleyTerry2’ is not available for package ‘caret’
* removing ‘/home/br00t/R/x86_64-pc-linux-gnu-library/3.1/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp7pWmvr/downloaded_packages’
> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8
[5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 LC_PAPER=en_CA.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] sp_1.0-16
loaded via a namespace (and not attached):
[1] grid_3.1.0 lattice_0.20-29 tools_3.1.0
Wasn't able to find anything helpful on the interwebs. Not sure if this is an issue with the BradleyTerry2 package or brglm... help?
Thanks,
br00t
If you are running a version of the brglm package greater than 0.5-9, uninstall and install brglm package version 0.5-9
I was able to get over the issue too by installing the dependencies. You may want to select your answer as the right one.