Error when checking R package on Ubuntu with github actions but not with rhub

We can use the package ibmAcousticR (GitHub - chrisumphlett/ibmAcousticR: Connect to Your IBM Acoustic Data) as an example, I'm having the exact same problem on multiple packages.

I have used R-hub (via devtools::check_rhub ) to verify that these packages can install on Ubuntu. These checks return no errors.

But I get an error with the installation of httr when the GH Action runs the check. (https://github.com/chrisumphlett/ibmAcousticR/runs/2953815888) Errors.

Why does one produce an error but not the other? What can I do to address it? Is this a known problem and I can ignore?

I have tried different versions of Ubuntu. I tried adding some string I don't understand that I saw was in the dplyr yaml file rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest". Still get same error.

So the issue is that curl (which httr imports) installation fails because it can't find the system dependency libcurl:

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
ERROR: configuration failed for package ‘curl’
Configuration failed because libcurl was not found. Try installing:
* removing ‘/home/runner/work/_temp/Library/curl’
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.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=...'

I think this might be because your yaml is missing this step.

      - name: Install system dependencies
        if: runner.os == 'Linux'
        run: |
          while read -r cmd
          do
            eval sudo $cmd
          done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')

Just as an fyi:
The rspm parameter gives a repository for the r studio package manager (rspm) replace line 28 in your yaml with this:

 - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

"focal" and "xenial" are the version names for ubunt, 20.04 is "focal fossa".

Thanks for the suggestion. I corrected the rspm URL, and, added that step to the yaml. Still get the error.

The action details: https://github.com/chrisumphlett/ibmAcousticR/runs/2975655089

The new step runs without errors, but check still fails.

You are installing the system dependencies after you try to install curl, so curl still fails to install.

I would suggest looking at the example yaml from r-lib:

1 Like

This topic was automatically closed 7 days after the last reply. 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.