ropensci / colocr

An R package for conducting co-localization analysis. Edit
https://docs.ropensci.org/colocr
GNU General Public License v3.0
26 stars 3 forks source link

Can't load library #7

Closed cwilso6 closed 2 months ago

cwilso6 commented 3 years ago

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'

MahShaaban commented 3 years ago

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

cwilso6 commented 3 years ago

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".