colocr icon indicating copy to clipboard operation
colocr copied to clipboard

Can't load library

Open cwilso6 opened this issue 4 years ago • 2 comments

install.packages('divo', dependencies = TRUE) trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/divo_1.0.1.tgz' Content type 'application/x-gzip' length 447850 bytes (437 KB) ================================================== downloaded 437 KB

The downloaded binary packages are in /var/folders/h4/ffr701pj76v3yfk3mv8qfgp0001hcr/T//Rtmp0KC6pD/downloaded_packages

install.packages('colocr', dependencies = TRUE) also installing the dependencies ‘bmp’, ‘readbitmap’, ‘downloader’, ‘igraph’, ‘imager’, ‘shinyBS’

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/bmp_0.3.tgz' Content type 'application/x-gzip' length 122119 bytes (119 KB)

downloaded 119 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/readbitmap_0.1.5.tgz' Content type 'application/x-gzip' length 16794 bytes (16 KB)

downloaded 16 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/downloader_0.4.tgz' Content type 'application/x-gzip' length 21630 bytes (21 KB)

downloaded 21 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/igraph_1.2.6.tgz' Content type 'application/x-gzip' length 8842303 bytes (8.4 MB)

downloaded 8.4 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/imager_0.42.8.tgz' Content type 'application/x-gzip' length 12549459 bytes (12.0 MB)

downloaded 12.0 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/shinyBS_0.61.tgz' Content type 'application/x-gzip' length 103566 bytes (101 KB)

downloaded 101 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/colocr_0.1.1.tgz' Content type 'application/x-gzip' length 3996140 bytes (3.8 MB)

downloaded 3.8 MB

The downloaded binary packages are in /var/folders/h4/ffr701pj76v3yfk3mv8qfgp0001hcr/T//Rtmp0KC6pD/downloaded_packages

library(colocr) Error: package or namespace load failed for ‘colocr’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/imager/libs/imager.so': dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/imager/libs/imager.so, 6): Library not loaded: /opt/X11/lib/libX11.6.dylib Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/imager/libs/imager.so Reason: image not found

install from github

devtools::install_github('ropensci/colocr') Downloading GitHub repo ropensci/colocr@HEAD These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All
2: CRAN packages only
3: None
4: viridisLite (0.3.0 -> 0.4.0) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1 viridisLite (0.3.0 -> 0.4.0) [CRAN] Installing 1 packages: viridisLite trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/viridisLite_0.4.0.tgz' Content type 'application/x-gzip' length 1296423 bytes (1.2 MB)

downloaded 1.2 MB

The downloaded binary packages are in /var/folders/h4/ffr701pj76v3yfk3mv8qfgp0001hcr/T//Rtmp0KC6pD/downloaded_packages ✓ checking for file ‘/private/var/folders/h4/ffr701pj76v3yfk3mv8qfgp0001hcr/T/Rtmp0KC6pD/remotes164f348808114/ropensci-colocr-9b7bd6e/DESCRIPTION’ (353ms) ─ preparing ‘colocr’: ✓ checking DESCRIPTION meta-information ... ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories Removed empty directory ‘colocr/docker’ ─ building ‘colocr_0.1.1.tar.gz’ Warning: invalid uid value replaced by that for user 'nobody'

  • installing source package ‘colocr’ ... ** using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/imager/libs/imager.so': dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/imager/libs/imager.so, 6): Library not loaded: /opt/X11/lib/libX11.6.dylib Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/imager/libs/imager.so Reason: image not found Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load Execution halted ERROR: lazy loading failed for package ‘colocr’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/colocr’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/colocr’ Warning message: In i.p(...) : installation of package ‘/var/folders/h4/ffr701pj76v3yfk3mv8qfgp0001hcr/T//Rtmp0KC6pD/file164f3e797431/colocr_0.1.1.tar.gz’ had non-zero exit status

cwilso6 avatar Apr 15 '21 18:04 cwilso6

Hi @cwilso6 This error is likely caused by multiple installations of the same package. You may try remove.packages first and then reinstall colocr.

MahShaaban avatar Apr 15 '21 23:04 MahShaaban

Thank you for your response. I was able get the package to work, but uninstalling and reinstalling was not enough. I had to also install xquartz on my mac laptop. I guessing that might be what fixed issue, because of this error occurring both yesterday and after reinstallation "Library not loaded: /opt/X11/lib/libX11.6.dylib".

cwilso6 avatar Apr 16 '21 16:04 cwilso6