centosR包安装出错C++14 but CXX14 没有指

2022-10-29  本文已影响0人  伍鸿荣

网上的方法挺多,用起来感觉挺麻烦,主要是.R路径按网上的方法可能不适用,下面我的方法在R程序直接解决

dotR <- file.path(Sys.getenv("HOME"), ".R")

if (!file.exists(dotR)) dir.create(dotR)

M <- file.path(dotR, "Makevars")

if (!file.exists(M)) file.create(M)

cat("\nCXX14FLAGS=-O3 -march=native -mtune=native -fPIC",

    "CXX14=/opt/rh/devtoolset-11/root/usr/bin/g++", # or clang++ but you may need a version postfix

    file = M, sep = "\n", append = TRUE)

上一篇 下一篇

猜你喜欢

热点阅读