devtools install on Rhel container

I am having an issue installing devtools on an RHEL container with R 4.2.2. For some reason my OS can't find the repos or cant install them on the OS.

--------------------------- [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] ---------------------------
    :1:10: fatal error: hb-ft.h: No such file or directory
    compilation terminated.

The repos for RHEL cant seem to find harfbuzz-devel and fribidi-devel. I have installed fribidi and get an output for 'which fribidi' but cant install the devel version manually. Anyone else have problems installing devtools on RHEL? Most of the posts are in ubuntu. No Rstudio just R and the OS cli.

What version of RHEL do you have? What kind of container? A UBI container?

PPM can give you advice on installing system requirements, e.g.

In "Setup" select the RHEL version you have. Unfortunately UBI containers are more restricted, and do not have the same packages and package sources, so with that it might be more difficult.

It is a UBI RHEL 8 podman container so that makes sense. I will check that site out thanks.

This works for me:


RUN yum install -y$(arch).rpm

RUN rig add release

RUN dnf install -y git openssl-devel freetype-devel libjpeg-turbo-devel libpng-devel libtiff-devel fontconfig-devel fr\
ibidi-devel harfbuzz-devel libxml2-devel libcurl-devel libicu-devel make zlib-devel

RUN R -q -e 'options(pkg.sysreqs = FALSE); pak::pkg_install("devtools")'

libgit2-devel is not available for ubi8, but luckily the gert package works without it as well, it downloads a static build of libgit2 AFAIR.

I am using ubi 8.7 however even with 8.8 I get the same error message.

Maybe try adding the codeready-builder package source on the host system? I think that also affects what is available in the container?

subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms

I tried having the repos set on the host machine, and configuring the container repos with those files. Neither of these yielded 'yum install's for the required packages for devtools. The error on the former was the repo wasnt found and on the ladder that the repos were misconfigured. I am on R 4.2.2 if that affects anything.

Did you try to build that Dockerfile? If you want R 4.2.2, then replace the rig add line with rig add 4.2.2.

For the record, that Dockerfile above does not build on a non-RHEL system. But for me it builds fine on and RHEL-8 host with these repositories configured:

[gaborcsardi@rhel8 ~]$ dnf repolist
Not root, Subscription Management repositories not updated
repo id                                              repo name
codeready-builder-for-rhel-8-x86_64-rpms             Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)
docker-ce-stable                                     Docker CE Stable - x86_64
rhel-8-for-x86_64-appstream-rpms                     Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms                        Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
[gaborcsardi@rhel8 ~]$

I am using podman for this project. The UBI build of Rhel does not contain all those repos. So I am not sure how to proceed.

I tried using dnf build dep R on the host and this is what appeared

Try registering with your redhat account.

I got some package rpms and got devtools to install. Is there any chance you can help with R base packages testing?

I am sorry, I don't know what you mean.

This topic was automatically closed after 45 days. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.