Cannot install ggplot2: “Error in library.dynam(lib, package, package.lib) : shared object ‘stringi.so’ not found”

前端 未结 3 2192
既然无缘
既然无缘 2021-01-04 09:54

Last week I upgraded from Ubuntu 14.04 to 14.10. The first time I\'ve tried to use ggplot in RStudio since the update, I\'m getting dependancy errors with my ggplot package

3条回答
  •  遥遥无期
    2021-01-04 10:06

    Following @Nick Kennedey's comment, I tried installing stringi like this:

    > install.packages("stringi",dep=TRUE)
    

    Which resulted in this error I hadn't seen before:

    2015-08-07 10:26:35 (256 KB/s) - ‘/tmp/RtmpQI4Uau/downloaded_packages/stringi_0.5-5.tar.gz’ saved [3639183/3639183]
    
    ERROR: failed to lock directory ‘/home/james/R/x86_64-pc-linux-gnu-library/3.1’ for modifying
    Try removing ‘/home/james/R/x86_64-pc-linux-gnu-library/3.1/00LOCK-stringi’
    Warning in install.packages :
      installation of package ‘stringi’ had non-zero exit status
    
    The downloaded source packages are in
        ‘/tmp/RtmpQI4Uau/downloaded_packages’
    > install.packages("stringi",dep=TRUE)
    

    So the I followed the suggestion in the error an removed the LOCK folder.

    In the terminal: rm -r /home/james/R/x86_64-pc-linux-gnu-library/3.1/00LOCK-stringi’

    Then tried installing the stringi package again, and it worked! This was the issue... now I've just finished installing with no issues.

    I am still a little bit confused though... as to how this error can come about. Any ideas on what causes this so I can avoid it in the future? Is it possible it was a symptom of my recent upgrade to 14.10?

提交回复
热议问题