我无法在Ubuntu 12.04(64位)上的R 3.0.2上安装XML包(请参阅下面的错误)。我在网上搜索,我也安装了xml2-dev。它安装但R找不到它的库!!
[.....]
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... /data/vision/polina/shared_software/install/gcc-4.3.4/bin/gcc
checking for C compiler default output file name... rm: cannot remove `a.out.dSYM': Is a directory
a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /data/vision/polina/shared_software/install/gcc-4.3.4/bin/gcc accepts -g... yes
checking for /data/vision/polina/shared_software/install/gcc-4.3.4/bin/gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... /data/vision/polina/shared_software/install/gcc-4.3.4/bin/gcc -E
checking for sed... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking for xml2-config... /afs/csail.mit.edu/u/k/kayhan/home_NFS/Enthought/Canopy_64bit/User/bin/xml2-config
USE_XML2 = yes
SED_EXTENDED_ARG: -E
Minor 7, Patch 8 for 2.7.8
Located parser file -I/afs/csail.mit.edu/u/k/kayhan/home_NFS/Enthought/Canopy_64bit/User/include/libxml2/parser.h
Checking for 1.8: -I/afs/csail.mit.edu/u/k/kayhan/home_NFS/Enthought/Canopy_64bit/User/include/libxml2
Using libxml2.*
checking for gzopen in -lz... yes
checking for xmlParseFile in -lxml2... no
checking for xmlParseFile in -lxml... no
configure: error: "libxml not found"
ERROR: configuration failed for package ‘XML’
* removing ‘/data/vision/polina/users/kayhan/R/x86_64-pc-linux-gnu-library/3.0/XML’
The downloaded source packages are in
‘/tmp/RtmpI2GiRG/downloaded_packages’
Warning message:
In install.packages("XML") :
installation of package ‘XML’ had non-zero exit status
正如我前面提到的,我已经安装了xml2:
sudo apt-get install libcurl4-openssl-dev libxml2-dev
kayhan@lemongrass:~$ locate libxml2.so
/usr/lib/x86_64-linux-gnu/libxml2.so.2
/usr/lib/x86_64-linux-gnu/libxml2.so.2.7.8
存储库中的“r-cran-xml”没有用,它是在R 3.0之前构建的。知道如何安装XML吗?许多其他包依赖它是非常必要的包。
谢谢,
世界报
答案 0 :(得分:0)
原来我的Python Enthought设置有冲突! Probaly因为它重载了一些库(通过修改LD_LIRARY)。在.bashrc中,我注释掉了:
VIRTUAL_ENV_DISABLE_PROMPT=1 source /[....]/Enthought/Canopy_64bit/User/bin/activate
并安装它,它的工作原理!奇怪的冲突!