0

I'm working on a R code where many package imports result in the following error:

> library(geepack)
Error: package or namespace load failed for ‘geepack’:
 .onLoad failed in loadNamespace() for 'pillar', details:
  call: readRDS(nsInfoFilePath)
  error: unknown input format

Other packages, used in my code, showing similar behavior include:

  • doBy
  • viridisLite
  • glmnet
  • ggplot2
  • tidyverse

I have spent several hours searching for an solution, without success.

If I try to install the pillar package, I get an indication of a success.

Finally my platform is:
86_64-w64-mingw32/x64 (64-bit)
Windows 10 x64 (build 19042)
R version 4.1.1 (2021-08-10)

Do you have an idea what is going wrong here?
Thank you :)
S

  • Hi, looks like a dependency is missing. I would restart R, install.packages("geepack", dependencies = TRUE), screen the output for any error messages. If they are related to any package names, try to install that package with dependencies = TRUE. If it works, try to install geepack again, if it doesn't work, screen the output for error messages. Continue until you either install geepack successfully or you get an error message which e.g. tells you something about missing libraries. Google for that, or provide more details here. – Saskia Schirmer Sep 06 '21 at 14:22
  • Hi, Thanks for you comment. Unfortunately your suggestion seems to make no difference. R, install.packages("geepack", dependencies = TRUE) gives a totally promising output. But, after restarting R again, library(geepack) outputs exactly the same message as before? I don´t see how I can provide more details. – Sigurjón Þorsteinsson Sep 06 '21 at 14:53
  • Can you provide the whole output? So, everything which is printed to your console after install.packages("geepack", dependencies = TRUE)? – Saskia Schirmer Sep 06 '21 at 15:28
  • `> install.packages("geepack", dependencies = TRUE) Installing package into ‘C:/Users/grjon/Documents/R/win-library/4.1’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- trying URL 'https://cran.hafro.is/bin/windows/contrib/4.1/geepack_1.3-2.zip' Content type 'application/zip' length 1204893 bytes (1.1 MB) downloaded 1.1 MB package ‘geepack’ successfully unpacked and MD5 sums checked The downloaded binary packages are in C:\Users\grjon\AppData\Local\Temp\RtmpeuocaH\downloaded_packages ` – Sigurjón Þorsteinsson Sep 06 '21 at 22:28
  • ok, I am not on windows, so maybe you need help by someone else. For me, it looks like, it doesn't install the package at all. Installation is successful when the last line of the output is "* DONE (geepack)". When I install geepack (on Linux) there are some lines of output belonging to C++ compiled code. So, this is just a guess: Do you have a C++-compiler installed on your computer? – Saskia Schirmer Sep 08 '21 at 07:00
  • No I don't have a C++ compiler on my system but I can install it if needed. I have already tried to install a Ubuntu virtual machine and try R there. In that case it looks like all packages are built from source. – Sigurjón Þorsteinsson Sep 08 '21 at 09:29
  • The first package in my script is "vars". The following is the output where the installation for this package fails on my Ubuntu VM: `gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -Wl,-z,relro -o strucchange.so strucchange_functions.o strucchange_init.o -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR /usr/bin/ld: cannot find -llapack /usr/bin/ld: cannot find -lblas collect2: error: ld returned 1 exit status make: *** [/usr/share/R/share/make/shlib.mk:10: strucchange.so] Error 1 ERROR: compilation failed for package ‘strucchange’` – Sigurjón Þorsteinsson Sep 08 '21 at 09:38
  • Look [here] (https://stackoverflow.com/questions/57762660/r-cannot-find-llapack-cannot-find-lblas). Installing `sudo apt install r-base-dev` (or only `sudo apt-get install liblapack-dev libblas-dev`) in the terminal in Linux may help. – Saskia Schirmer Sep 08 '21 at 10:48
  • Possibly I could have Googled for this thread, but thank you so much for enabling me take the next step in R... now in linux ;) – Sigurjón Þorsteinsson Sep 08 '21 at 13:21

0 Answers0