mcsiple / mmrefpoints

A package for simulating marine mammal abundance and calculating reference points.
Other
3 stars 5 forks source link

`magick` is not installed with the library #55

Closed tbrown122387 closed 2 years ago

tbrown122387 commented 2 years ago

For some reason my devtools::install_github() fails. I get this

Installing package into ‘/home/taylor/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
ERROR: dependency ‘magick’ is not available for package ‘mmrefpoints’
* removing ‘/home/taylor/R/x86_64-pc-linux-gnu-library/4.1/mmrefpoints’
Warning messages:
1: In i.p(...) : installation of package ‘magick’ had non-zero exit status
2: In i.p(...) :
  installation of package ‘/tmp/RtmpYNeccD/file19fef3d8f047b/mmrefpoints_0.0.0.9000.tar.gz’ had non-zero exit status

magick is in the DESCRIPTION file, so that's not the problem. It attempted to install magick but I got this:

* installing *source* package ‘magick’ ...
** package ‘magick’ successfully unpacked and MD5 sums checked
** using staged installation
Package Magick++ was not found in the pkg-config search path.
Perhaps you should add the directory containing `Magick++.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Magick++' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lMagick++-6.Q16
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the Magick++ library. Try installing:
 - deb: libmagick++-dev (Debian, Ubuntu)
 - rpm: ImageMagick-c++-devel (Fedora, CentOS, RHEL)
 - csw: imagemagick_dev (Solaris)
 - brew imagemagick@6 (MacOS)
For Ubuntu versions Trusty (14.04) and Xenial (16.04) use our PPA:
   sudo add-apt-repository -y ppa:cran/imagemagick
   sudo apt-get update
   sudo apt-get install -y libmagick++-dev
If Magick++ is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a Magick++.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: Magick++.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘magick’
* removing ‘/home/taylor/R/x86_64-pc-linux-gnu-library/4.1/magick’

.pc files are DOS-specific if I recall correctly. I'm running this on

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04
Codename:   focal

openjournals/joss-reviews#3888

mcsiple commented 2 years ago

Hi @tbrown122387 -- sorry about that.

Have you tried installing the ImageMagick++ library on your machine? For Ubuntu it should be installable using: sudo apt-get install libmagick++-dev (I got this from here).

Secondly, does mmrefpoints load even though you get this error on install? I only ask because in the package, magick is used to run the gif engine for one of the tabs in the app and plays a pretty small role (but one I haven't been able to replace w anything else). If you can still install it, you can review the rest of the package and app's functionality while I figure out the magick issue.

tbrown122387 commented 2 years ago

@mcsiple okay great, that works! Maybe a small tidbit should be added to the install section in the README that mentions the added difficulty for Linux folks?

Regarding your second paragraph, I doubt the rest of it would load. I'm looking at the last line of the error message. It just deletes all of the progress if it doesn't get to the end successfully.

Happy holidays by the way!

mcsiple commented 2 years ago

I added a note to the README for Linux users! Just saw your other message and will answer shortly.