ctmm-initiative / ctmm

Continuous-Time Movement Modeling. Functions for identifying, fitting, and applying continuous-space, continuous-time stochastic movement models to animal tracking data.
http://biology.umd.edu/movement.html
43 stars 10 forks source link

double free or corruption (out) - ERROR: lazy loading failed for package ‘ctmm’ #42

Closed SabrinaGastebois closed 2 years ago

SabrinaGastebois commented 2 years ago

Hello,

I faced the following issue when I tried to install "ctmm" package under Ubuntu operating system.

  > install.packages("ctmm")
  Installing package into ‘/home/stage/R/x86_64-pc-linux-gnu-library/4.1’
  (as ‘lib’ is unspecified)
  trying URL 'https://cloud.r-project.org/src/contrib/ctmm_0.6.1.tar.gz'
  Content type 'application/x-gzip' length 2264306 bytes (2.2 MB)
  ==================================================
  downloaded 2.2 MB

  * installing *source* package ‘ctmm’ ...
  ** package ‘ctmm’ successfully unpacked and MD5 sums checked
  ** using staged installation
  ** R
  ** data
  ** inst
  ** byte-compile and prepare package for lazy loading
  double free or corruption (out)
  Aborted (core dumped)
  ERROR: lazy loading failed for package ‘ctmm’
  * removing ‘/home/stage/R/x86_64-pc-linux-gnu-library/4.1/ctmm’
  Warning in install.packages :
    installation of package ‘ctmm’ had non-zero exit status

  The downloaded source packages are in
      ‘/tmp/RtmpR1fxtv/downloaded_packages’

Do you have an idea on how to solve this ? Many thanks,

Sabrina

chfleming commented 2 years ago

Hmm... that's something happening at a lower level in R than the package. Just a (probably wrong) guess, but do you have all of the required libraries installed. This is what I needed last time I installed on GitHub:

sudo apt install fftw3 libfftw3-dev libgdal-dev libgeos-dev libgit2-dev libgmp-dev libgsl-dev libmpfr-dev libproj-dev libnode-dev libudunits2-dev r-base-core

I will try again to see if I can reproduce this error on Ubuntu, or if the above needs to be updated.

SabrinaGastebois commented 2 years ago

Hello, Indeed, even after having installed two missing libraries of your list issue is still there. It seems related to the Ubuntu or R installation. In any cases, thank you for your answer

chfleming commented 2 years ago

I just installed ctmm on Ubuntu without issue, which I suspected would be the case.

Someone here solved the same issue (with another package) by updating Ubuntu:

sudo apt-get update

sudo apt-get dist-upgrade

SabrinaGastebois commented 2 years ago

Ok, thank you for testing. Issue is now solved changing the version of R from 4.1.3 to 4.0.5. Thanks,

chfleming commented 2 years ago

That's strange. I'm running Ubuntu 20.04.4 LTS and R 4.1.3. Did you have all of your R packages updated? I did have to update some of the R packages within sudo R, when not having file permissions (for packages included in the base install). But I didn't run into any other issues.

Anyhow, I hope this stays working for you when R 4.2 hits the repositories.