R 3.5.0 problem installing libraries

Error Information:

Trying to install packages (in this example "tidyverse" - but true for other packages as well) and run into troubles that dependencies and other packages are not available.

Steps taken so far: Re-installed R and RStudio, changing the library folder (rstudio - Change R default library path using .libPaths in Rprofile.site fails to work - Stack Overflow)

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: 1.1.453
  • OS Version: Antergos 18.04 (but similar problems under Win7)
  • R Version: 3.5.0

Also:

sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Antergos Linux

Matrix products: default
BLAS: /usr/lib/libblas.so.3.8.0
LAPACK: /usr/lib/liblapack.so.3.8.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] ggplot2_2.2.1

loaded via a namespace (and not attached):
[1] colorspace_1.3-2 scales_0.5.0 compiler_3.5.0 lazyeval_0.2.1 plyr_1.8.4
[6] tools_3.5.0 pillar_1.2.3 gtable_0.2.0 tibble_1.4.2 yaml_2.1.19
[11] Rcpp_0.12.17 grid_3.5.0 rlang_0.2.1 munsell_0.5.0


From Troubleshooting Guide: Using RStudio

Because the internals have changed for R 3.5, you have to install the packages again.

Is this happening to you in RStudio, but not in vanilla R? (see FAQ below for disambiguation)

Thanks mara,
this was a very good comment and helpful advice. The problem actually occurred under vanilla R just as well. Since I use R only in RStudio, I kinda forgot that those are distinct entities. I will reach out to R itself now!

Did you try update.packages(checkBuilt = TRUE, ask = FALSE)?

That's the standard method for re-installing packages after a major version update, when they may need to be recompiled due to internal changes. Here's more info on why the R 3.5.0 transition is such a big one:

Dear JC Blum,

thank you for your comment. I tried the command you have mentioned -
unfortunately without success.

It couldn't be that easy, right? :upside_down_face:

OK, you said you had problems both on your Antergos Linux system and on your Windows 7 system β€” can you break down exactly what you have tried on each system, and the specific output you get? I'm sorry to be so picky, but unfortunately it's hard to sort this stuff out without the gory details.

Sometimes this happens because one package installation in the chain of dependencies fails, with cascading effects. The trick is to figure out where the failure happened, and after that it sometimes works better to install the dependencies one by one. Sometimes it's a problem with an external dependency (non-R), which you would need to update through your operating system. You may even have slightly different underlying issues on your Linux and Windows systems. So more information is necessary to untangle the knots!

2 Likes

No problem at all - I very much appreciate your time and friendly advice!

So I tried the update function that you suggested. I also re-installed R and
RStudio.
I changed lib.paths and checked whether old paths exist (which they don't -
also it was a brand new installation, so it would be very odd if old stuff
existed...)

I installed the tidyverse via the AUR now, which seems to work, but not solve
the underlying problem (and also does not fix the same issue when trying to
install other packages...)

At some point I ran into a gfortran problem (gfortran being missing), which I
cannot reproduce right now.

I tried installing the packages in vanilla R (so not RStudio) and ran into the
same problem and same error message - so it's not the RStudio IDE.

I think that's all I tried so far.

Also the knitr persists on both systems as well, which I didn't even know
where to start trying to fix it, since the error message does not make sense
to me.

If there is anything else I can do to help solve the problem, please let me
know! I very much appreciate your time and help!

If I do "update.packages(checkBuilt = TRUE, ask = FALSE)`" right now, I get
the following response:

update.packages(checkBuilt = TRUE, ask = FALSE)
Warnung: package 'MASS' in library '/usr/lib/R/library' will not be updated
Warnung: package 'mgcv' in library '/usr/lib/R/library' will not be updated
Warnung: package 'survival' in library '/usr/lib/R/library' will not be
updated

without any further errors or explanations

Trying to install another package (e.g. ggExtra) I get this:

install.packages("ggExtra")
Installing package into β€˜/home/user/R/x86_64-pc-linux-gnu-library/3.5’
(as β€˜lib’ is unspecified)
versuche URL 'https://cran.rstudio.com/src/contrib/ggExtra_0.8.tar.gz'
Content type 'application/x-gzip' length 292232 bytes (285 KB)

1 Like

The error above is sometimes associated with not having admin permissions to install packages to this directory on a windows machine.

Here's some advice (replace nicePack with your problem packages):