关于编译器

最后发布时间:2022-07-13 21:11:28 浏览量:

options(repos=structure(c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")))

scl enable devtoolset-7 bash即可切换GCC至7.3.1版本
source /opt/rh/devtoolset-9/enable
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/anaconda3/lib
export LD_LIBRARY_PATH

R不能正确加载动态库

图片alt

图片alt

 ldd /home/R/x86_64-redhat-linux-gnu-library/4.1/xml2/libs/xml2.so

图片alt

图片alt

locate libicuuc.so.58

图片alt

图片alt

添加ldconfig寻找路径

include /etc/ld.so.conf.d/.conf
进入/etc/ld.so.conf.d目录内,创建
.conf文件,文件名随意,扩展名必须为.conf
sudo ldconfig

ldconfig -p | grep libpng

--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the harfbuzz freetype2 fribidi library. Try installing:
 * deb: libharfbuzz-dev libfribidi-dev (Debian, Ubuntu, etc)
 * rpm: harfbuzz-devel fribidi-devel (Fedora, EPEL)
 * csw: libharfbuzz_dev libfribidi_dev (Solaris)
 * brew: harfbuzz fribidi (OSX)
If harfbuzz freetype2 fribidi is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a harfbuzz freetype2 fribidi.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: hb-ft.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘textshaping’

参考

https://zhuanlan.zhihu.com/p/530629377