R: Error in dyn.load(file, DLLpath = DLLpath, …)

前端 未结 4 2212
醉话见心
醉话见心 2021-01-04 12:33

I have worked now for some time on an R project in my office\'s desktop computer, but need to carry the scripts with me while on travel. I copied everything into my laptop a

相关标签:
4条回答
  • 2021-01-04 13:09

    For Mac / Linux

    1. Press command + space
    2. Type terminal and press enter to open terminal. In terminal paste this open /Library/Frameworks/R.framework/Resources/library and press enter. A finder window should open with a lot of folders
    3. Each folder matches an installed R package.
    4. Delete them all, close RStudio, reopen RStudio and install the packages you need with install.packages("dplyr") etc

    After I did this, the issue went away

    0 讨论(0)
  • 2021-01-04 13:10

    The problem is the linkage with your g++ stdlib. Different versions of Ubuntu have different versions of g++ stdlib. You cant always copy binaries from one to the other.

    You may fix this by recompiling R for the laptop, or using the Ubuntu R packages. e.g. http://packages.ubuntu.com/xenial/r-base

    0 讨论(0)
  • 2021-01-04 13:12

    What is .libPaths() giving you as the output?

    I encountered the same problem using the latest update today (R 3.3.1 for MacOS X). My R installation seemed to crash after updating it. My solution was simply to remove the lib directories from the file system and reinstall R:

    rm -rf /Users/johann/Library/R/3.3/library
    sudo rm -rf Library/Frameworks/R.framework/Versions/3.3/Resources/library
    

    Hope this helps...

    0 讨论(0)
  • 2021-01-04 13:17

    I had a similar issue with rgdal on Ubuntu. Re-installing the package was enough to getting it working again.

    $ sudo R
    > install.packages("rgdal")
    > quit()
    $ exit
    
    0 讨论(0)
提交回复
热议问题