我一直在嘗試安裝rpy2並從源代碼安裝R軟件包....我首先通過使用conda的binstar安裝了rpy2。這似乎安裝好了,但當我嘗試從源代碼編譯我的R包時,我得到了下面的錯誤。Ubuntu中的rpy2安裝錯誤
所以我卸載R並刪除了rpy2 conda包。然後我重新安裝了R,並試圖
pip install rpy2
但這無法安裝併產生以下錯誤:
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/usr/share/R/include -I/home/alex/anaconda/include/python2.7 -c ./rpy/rinterface/_rinterface.c -o build/temp.linux-x86_64-2.7/./rpy/rinterface/_rinterface.o
In file included from /usr/include/signal.h:28:0,
from ./rpy/rinterface/_rinterface.c:51:
/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory
# include <sys/cdefs.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
我想,我第一次安裝的暢達包遇到了類似的問題,但它只是試圖從源代碼編譯R包而被發現的?它抱怨同樣cdefs.h文件...
樂意給任何需要調試
這個問題'askubuntu'可能是相關的:http://askubuntu.com/questions/470796/fatal-error-sys-cdefs-h-no-such-file-或目錄 – cel 2014-12-05 11:24:41