1

I have an rmd file with plots and I am trying to publish the .rmd file into my dedicated server. The process starts but then fails all of a sudden. I tried to google a solution but I cant seem to understand whats happening exactly.

this is the final error message I get

--------------------------- [ANTICONF] --------------------------------
Configuration failed because libarchive was not found. Try installing:
 * deb: libarchive-dev (Debian, Ubuntu, etc)
 * rpm: libarchive-devel (Fedora, CentOS, RHEL)
 * csw: libarchive_dev (Solaris)
 * brew: libarchive (Mac OSX)
If libarchive is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libarchive.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=...'
--------------------------------------------------------------------
* installing to library ‘/usr/lib/R’
* installing *source* package ‘archive’ ...
** package ‘archive’ successfully unpacked and MD5 sums checked
** using staged installation
<stdin>:1:10: fatal error: archive.h: No such file or directory
compilation terminated.
ERROR: configuration failed for package ‘archive’
* removing ‘/usr/lib/R/archive’## End Task Log ################################################################
Error: Unhandled Exception: child_task=1406817497 child_task_status=failed: Error building image: Error building archive (1.1.7). Build exited with non-zero status: 1
Execution halted

I am not very good with cmd and interpreting the outputs so if anyone can suggest some steps I can take to resolve this would be much appreciated.

3
  • 1
    What operating system are you using? The message in the ANTICONF section tells you what command you need to install depending on your operating system. For ubuntu, it would be something like apt install libarchive-dev Commented Apr 17, 2024 at 19:46
  • I am using a windows pc Commented Apr 17, 2024 at 20:27
  • 1
    Shiny server runs on another operating system called Linux. In R, the command version$platform can show which operating system R is running on. Commented Apr 21, 2024 at 9:42

1 Answer 1

0

The error message indicates that the archive package, which is required for building the archive (presumably your R Markdown document), cannot be found. This is because a dependency, libarchive, is missing from your systemm Here's how to resolve this issue:

  • Install libarchive:
    • Debian/Ubuntu: sudo apt install libarchive-dev
    • Fedora/CentOS/RHEL: sudo yum install libarchive-devel
    • Solaris: csw install libarchive_dev
    • macOS (Homebrew): brew install libarchive
  • After installation, retry building your R Markdown document. If libarchive is already installed, you might need to adjust your environment variables to ensure pkg-config finds the libarchive.pc file. Refer to the full error message for moore details on how to set INCLUDE_DIR and LIB_DIR manually.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.