最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

GitHub Action R Dependency curl Fails Install - Stack Overflow

programmeradmin4浏览0评论

I'm trying to render a github.io repository using the GitHub Actions feature that will update the page on a gh-pages branch every time I push changes to the main branch. I followed this YouTube video's direction, and everything works except the "Install R Dependencies" build-deploy section.

Based on the error (copied below) it looks like the R package curl is having a hard time finding libcurl. Since this deployment is through a GitHub Actions, I'm not sure how to resolve this error. I've found troubleshooting attempts that suggested modifying the publish.yml file but those don't work at all.

My Quarto project uses renv so the GitHub actions YMAL file has this form: .github/workflows/publish.yml. The only part of it I changed was r-version: 4.4.3.

The error I get is:

- Installing curl ...                           FAILED
Error: Error: Error installing package 'curl':
================================
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
--------------------------- [ANTICONF] --------------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
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=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: curl/curl.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/home/runner/work/Data-Visualization-with-ggplot2/Data-Visualization-with-ggplot2/renv/staging/1/curl’
install of package 'curl' failed [error code 1]
Traceback (most recent calls last):
13: renv::restore()
12: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
11: renv_install_impl(records)
10: renv_install_staged(records)
 9: renv_install_default(records)
 8: handler(package, renv_install_package(record))
 7: renv_install_package(record)
 6: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
 5: renv_install_package_impl(record)
 4: r_cmd_install(package, path)
 3: r_exec_error(package, output, "install", status)
 2: abort(all)
 1: stop(fallback)
Execution halted
Error: Process completed with exit code 1.

Any suggestions are greatly appreciated!

发布评论

评论列表(0)

  1. 暂无评论