Например, при попытке установить пакет R curl
как зависимость usethis
:
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
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 ---------------------------
Configuration failed because libcurl was not found. Try installing:
* 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=...'
R обнаруживает, что у меня не установлен libcurl. На каком уровне находится этот внешний деп. указано? Я знаю, что внешние зависимости могут быть указаны в файле DESCRIPTION, и действительно файл pkg DESCRIPTION curl содержит:
SystemRequirements: libcurl: libcurl-devel (rpm) or libcurl4-openssl-dev (deb).
Но позволила ли R обнаружить недостающую зависимость и распечатать эту ошибку? Не может быть, верно? Как это могло? Итак, как R это делает?