r-lib / archive

R bindings to libarchive, supporting a large variety of archive formats
https://archive.r-lib.org/
Other
145 stars 17 forks source link

Cannot install archive even libarchive-dev is present on Debian #34

Closed JackieMium closed 4 years ago

JackieMium commented 4 years ago

I've installed libarchive-dev on Debian and both libarchive.pc and archive.h are present, but archive installation still complains about missing archive.h:

image

jimhester commented 4 years ago

Did you check that pkg-config is in your path and that pkg-config --cflags libarchive returns something?

JackieMium commented 4 years ago

this is odd:

➜  ~ which pkg-config 
/usr/bin/pkg-config
➜  ~ pkg-config --version
0.29.2
➜  ~ pkg-config --cflags libarchive 

➜  ~ pkg-config --list-all|grep libarchive
libarchive                     libarchive - library that can create and read several streaming archive formats

This error only happens in an R session under a conda environment. I have vanilla R installed via apt install from Debian official repo and I issued devtools::install_github("jimhester/archive") in a fresh new startup session, archive was successfully installed without any error. But when I launch a conda-R session and install archive package there, the above error persisted.

conda R version is 3.6.3 (2020-02-29) and debian repo R version is 4.0.3 (2020-10-10).

jimhester commented 4 years ago

I don't know, there must be an issue with pkg-config installed in the conda environment or something like that. I don't know anything about conda and in general don't think it is wise to use it with R packages, you will have to get assistance elsewhere.

As I don't believe this is an issue with the archive package I am closing this issue.