- Error in if (nzchar(SHLIB_LIBADD)) SHLIB_LIBADD else character() :
argument is of length zero
原因:R目录下的R/etc/Makeconf为空
多数出现在anaconda下安装R的情况
可以把其他地方的非空的Makeconf拷贝过去
miniconda3/pkgs/r-base-4.0.2-h95c6c4b_0/lib/R/etc/Makeconf
/miniconda3/lib/R/etc/Makeconf
参考:https://stackoverflow.com/questions/53813323/installing-r-packages-in-macos-mojave-error-in-if-nzcharshlib-libadd
----------------------------- ANTICONF -------------------------------
Configuration failed to find libgit2 library. Try installing:
- brew: libgit2 (MacOS)
- deb: libgit2-dev (Debian, Ubuntu, etc)
- rpm: libgit2-devel (Fedora, CentOS, RHEL)
If libgit2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libgit2.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: git2.h: No such file or directory
compilation terminated.
conda install libgit2