Closed ianutin closed 6 months ago
hello, I have the same issue on my MacBookPro M2. Here is the output of install_packages("ragg")
:
Installing package into ‘/opt/homebrew/lib/R/4.3/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/ragg_1.2.5.tar.gz'
Content type 'application/x-gzip' length 427859 bytes (417 KB)
==================================================
downloaded 417 KB
* installing *source* package ‘ragg’ ...
** package ‘ragg’ successfully unpacked and MD5 sums checked
** using staged installation
Homebrew 4.1.13
Using PKG_CFLAGS=-I/opt/homebrew/include -I/opt/homebrew/include/freetype2
Using PKG_LIBS=-L/opt/homebrew/lib -lfreetype -lpng16 -ltiff -lz -ljpeg -lbz2
-----------------------------[ ANTICONF ]-------------------------------
Configuration failed to find one of freetype2 libpng libtiff-4 libjpeg. Try installing:
* deb: libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev (Debian, Ubuntu, etc)
* rpm: freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel (Fedora, CentOS, RHEL)
* csw: libfreetype_dev libpng16_dev libtiff_dev libjpeg_dev (Solaris)
If freetype2 libpng libtiff-4 libjpeg is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a freetype2 libpng libtiff-4 libjpeg.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>:3:10: fatal error: 'tiffio.h' file not found
#include <tiffio.h>
^~~~~~~~~~
1 error generated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘ragg’
* removing ‘/opt/homebrew/lib/R/4.3/site-library/ragg’
Warning in install.packages :
installation of package ‘ragg’ had non-zero exit status
and here is the output of sessionInfo()
:
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin22.4.0 (64-bit)
Running under: macOS Ventura 13.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /opt/homebrew/Cellar/r/4.3.1/lib/R/lib/libRlapack.dylib; LAPACK version 3.11.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/Paris
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.3.1 tools_4.3.1
I have installed R-ragg via MacPorts but it doesn't seem to work. I should add that although I have 15+ years of experience with Ubuntu, I'm a newbie with MacOS.
@joelgombin I have no experience with MacPorts or what R-ragg
is on there so it is a bit difficult to help
Usually I would advise to just install the binary when on a Mac. If you insist on compiling from source, then use home-brew to install the system libraries that the error message suggests
@ianutin have you tried following the direction in the error message and installed the relevant system libraries?
Note, not the OP, but I was able to fix the same issue by trying to install each of the module listed in the error message. Eventually, the following did the trick
sudo apt install libtiff5-dev
Since everyone is going to be a little different (I am using PopOS 22.04 LTS), but following the instructions seems to work.
Try locate freetype2
when i installed it...there are some errors