在Mac OS上安装igraph R软件包时出现lang铛问题

时间:2018-10-13 23:10:19

标签: r macos clang igraph

我正在尝试在Mac上安装pagoda2 R软件包。

是否:

brew update
brew install cmake boost eigen gsl curl openssl wget

要求。

然后下载并安装了clang4-r.pkg软件包。

然后安装了Mac版gfortran。

然后在内部R部分中,在:

install_github("igraph/rigraph")

由于以下错误而失败:

* installing *source* package ‘igraph’ ...
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/private/var/folders/t1/t8mvpqx15t50z60z7nqt18y40000gn/T/RtmpNhyp5H/devtools65d816247573/igraph-rigraph-057cc9d':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
ERROR: configuration failed for package ‘igraph’

我尝试将.R / Makevars文件编辑为以下内容:

# The following statements are required to use the clang4 binary
LDFLAGS=-L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include


#CC=/usr/local/clang4/bin/clang
CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
#CXX=/usr/local/clang4/bin/clang++
CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
#CXX1X=/usr/local/clang4/bin/clang++
CXX1X=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
#CXX98=/usr/local/clang4/bin/clang++
CXX98=/usr/local/clang4/bin/clang
#CXX11=/usr/local/clang4/bin/clang++
CXX11=/usr/local/clang4/bin/clang
#CXX14=/usr/local/clang4/bin/clang++
CXX14=/usr/local/clang4/bin/clang
#CXX98=/usr/local/clang4/bin/clang
CXX98=/usr/local/clang4/bin/clang
#LDFLAGS=-L/usr/local/clang4/lib
# End clang4 inclusion statements

但还是相同的错误消息。

有什么主意吗?

0 个答案:

没有答案