Hi all
Recently we're having trouble installing tidyverse on Posit Workbench. It seems to be due to due to problems with the "textshaping" package and its dependencies fribidi and harfbuzz.
> install.packages("tidyverse")
Installing package into ‘/home/woodwards@dexcel.co.nz/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘textshaping’, ‘ragg’
trying URL 'https://cran.rstudio.com/src/contrib/textshaping_0.3.6.tar.gz'
Content type 'application/x-gzip' length 35722 bytes (34 KB)
==================================================
downloaded 34 KB
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
trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_2.0.0.tar.gz'
Content type 'application/x-gzip' length 704618 bytes (688 KB)
==================================================
downloaded 688 KB
* installing *source* package ‘textshaping’ ...
** package ‘textshaping’ successfully unpacked and MD5 sums checked
** using staged installation
Package fribidi was not found in the pkg-config search path.
Perhaps you should add the directory containing `fribidi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fribidi' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfreetype -lharfbuzz -lfribidi -lpng
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the harfbuzz freetype2 fribidi library. Try installing:
* deb: libharfbuzz-dev libfribidi-dev (Debian, Ubuntu, etc)
* rpm: harfbuzz-devel fribidi-devel (Fedora, EPEL)
* csw: libharfbuzz_dev libfribidi_dev (Solaris)
* brew: harfbuzz fribidi (OSX)
If harfbuzz freetype2 fribidi is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a harfbuzz freetype2 fribidi.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: hb-ft.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘textshaping’
* removing ‘/home/woodwards@dexcel.co.nz/R/x86_64-pc-linux-gnu-library/4.1/textshaping’
Warning in install.packages :
installation of package ‘textshaping’ had non-zero exit status
ERROR: dependency ‘textshaping’ is not available for package ‘ragg’
* removing ‘/home/woodwards@dexcel.co.nz/R/x86_64-pc-linux-gnu-library/4.1/ragg’
Warning in install.packages :
installation of package ‘ragg’ had non-zero exit status
ERROR: dependency ‘ragg’ is not available for package ‘tidyverse’
* removing ‘/home/woodwards@dexcel.co.nz/R/x86_64-pc-linux-gnu-library/4.1/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpRHIrIM/downloaded_packages’
> install.packages("textshaping")
Installing package into ‘/home/woodwards@dexcel.co.nz/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/textshaping_0.3.6.tar.gz'
Content type 'application/x-gzip' length 35722 bytes (34 KB)
==================================================
downloaded 34 KB
* installing *source* package ‘textshaping’ ...
** package ‘textshaping’ successfully unpacked and MD5 sums checked
** using staged installation
Package fribidi was not found in the pkg-config search path.
Perhaps you should add the directory containing `fribidi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fribidi' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfreetype -lharfbuzz -lfribidi -lpng
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the harfbuzz freetype2 fribidi library. Try installing:
* deb: libharfbuzz-dev libfribidi-dev (Debian, Ubuntu, etc)
* rpm: harfbuzz-devel fribidi-devel (Fedora, EPEL)
* csw: libharfbuzz_dev libfribidi_dev (Solaris)
* brew: harfbuzz fribidi (OSX)
If harfbuzz freetype2 fribidi is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a harfbuzz freetype2 fribidi.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: hb-ft.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘textshaping’
* removing ‘/home/woodwards@dexcel.co.nz/R/x86_64-pc-linux-gnu-library/4.1/textshaping’
Warning in install.packages :
installation of package ‘textshaping’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmprpdF26/downloaded_packages’
install.packages("fribidi")
Installing package into ‘/home/woodwards@dexcel.co.nz/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘fribidi’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Our version of R is 2023.03.1 and we run it an Ubuntu box, more details below.
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04