r-lib / ragg

Graphic Devices Based on AGG
https://ragg.r-lib.org
Other
172 stars 24 forks source link

Error: package or namespace load failed for ‘ragg’ in dyn.load(file, DLLpath = DLLpath, ...): #148

Closed jxu closed 6 months ago

jxu commented 10 months ago
export PKG_CONFIG_PATH=/sasdata/anaconda3/lib/pkgconfig:/sasdata/anaconda3/include/freetype2
R CMD INSTALL --configure-vars='LIB_DIR=/sasdata/anaconda3/lib INCLUDE_DIR="/sasdata/anaconda3/include/freetype2 -I/sasdata/anaconda3/include"'  /tmp/RtmpecGmiD/downloaded_packages/ragg_1.2.6.tar.gz

I was able to compile all the ragg source, but it still absolutely resists installing:

installing to /home/jxu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-ragg/00new/ragg/libs
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package ‘ragg’
    finding HTML links ... done
    agg_capture                             html
    agg_jpeg                                html
    agg_png                                 html
    agg_ppm                                 html
    agg_supertransparent                    html
    agg_tiff                                html
    ragg-package                            html
    reexports                               html
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘ragg’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/jxu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-ragg/00new/ragg/libs/ragg.so':
  libpng16.so.16: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed

I have checked libpng16.so.16 is in the PATH, so I don't know what the issue is. Ragg and textshaping have caused so many issues installing tidyverse on RHEL 7.9.

jxu commented 10 months ago

I got it to install with export LD_LIBRARY_PATH. Hopefully this is not needed every package load.

thomasp85 commented 6 months ago

In general mixing in anaconda is just a bad idea in my experience. If you need/want to use conda for R then stick to that for installing packages as well