Open dm8000 opened 2 years ago
In this case you need to build magick from source. For example, to install magick in /cluster/soft/magick
and let R find it, you may do like this:
tar xvzf ImageMagick.tar.gz
cd ImageMagick-7.1.0-51
./configure --prefix=/cluster/soft/magick
make
make install
export PKG_CONFIG_PATH=/cluster/soft/magick/lib/pkgconfig
export LD_LIBRARY_PATH=/cluster/soft/magick/lib
cd /temp/dir/to/build/r-magick
git clone https://github.com/ropensci/magick
R CMD INSTALL magick
@zhenglukai I am trying this process to install magick for use on HPC system and am running into some issues. Due to allocation limits I am trying to install into an R library I specified in my project directory. I adjusted the first code chunk as follows:
tar xvzf ImageMagick.tar.gz
cd ImageMagick-7.1.0-62
./configure --prefix=/project/dir/R/lib/magick LDFLAGS='-L/project/dir/R/lib'
make
make install
At this point, I get the following warning:
cp -f Magick++/lib/Magick++.pc Magick++/lib/Magick++-7.Q16HDRI.pc
make[1]: warning: Clock skew detected. Your build may be incomplete.
When I run the R CMD at the end of the code chunk, I get the following error:
ERROR: cannot install to srcdir for package ‘magick’
I have already tried conventional package installation in R v4.2.0 and when running in console it outputs the following error:
Error: package or namespace load failed for ‘magick’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/project/dir/R/lib/magick/libs/magick.so':
libMagick++-6.Q16.so.8: cannot open shared object file: No such file or directory
Interestingly, this installation works if I'm using an interactive RStudio Server session. However, I need to be able to submit batch jobs that can run a long time so need to find a way to get a complete install.
Hi @burnsal ,
Regarding the "Clock skew detected" warning, usually make clean
and rebuilding the software could help.
libMagick++-6.Q16.so.8: cannot open shared object file: No such file or directory
Please take a look at the directory where you installed ImageMagick. You built ImageMagick from the source file of version 7.1.0, so I assume there is no libMagick++-6.Q16.so.8
. See if making a soft link named libMagick++-6.Q16.so.8
to the actual file in your folder helps.
Good luck!
Thanks @zhenglukai ! Still trying to find a workaround. Do you have any thoughts on the srcdir error?
ERROR: cannot install to srcdir for package ‘magick’
Thanks @zhenglukai ! Still trying to find a workaround. Do you have any thoughts on the srcdir error?
ERROR: cannot install to srcdir for package ‘magick’
Did you download the source code of the R package to the location of your R library (R_LIBS_USER)? If that is the case, try to download the source in another place and R CMD INSTALL magick
there.
I was having a similar issue installing the package in RStudio server being managed by IT (so no sudo for me).
I followed the steps posted by @zhenglukai but ended up with the following error message when calling library(magick)
:
libMagick++-7.Q16HDRI.so.5: cannot open shared object file: No such file or directory
The missing piece of information to solve this issue was to use:
dyn.load("/path/to/libMagick++-7.Q16HDRI.so.5")
Now just gotta go figure out how to install popper for pdftools...
Hello. I have tried installing magick in a R terminal and got this
I am using R remotely and I have no root access. I have tried downloading the rpm binaries for installation instead, but there is an unending loop of dependencies that make this impossible. Is there any alternative for the installation?