在R上安装XML

时间:2014-08-12 17:13:38

标签: xml linux r ubuntu-14.04

我有ubuntu 14.04,我无法在R 3.0.2上安装XML包,当我点击

install.packages("XML")

我得到了回来;

Installing package into ‘/home/samuel/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
probando la URL 'http://cran.rstudio.com/src/contrib/XML_3.98-1.1.tar.gz'
Content type 'application/x-gzip' length 1582216 bytes (1.5 Mb)
URL abierta
==================================================
downloaded 1.5 Mb

* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... 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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
* removing ‘/home/samuel/R/x86_64-pc-linux-gnu-library/3.0/XML’
Warning in install.packages :
  installation of package ‘XML’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpySPbSU/downloaded_packages

为此我得到了我应该安装xml2-config的东西,但是当我尝试我得到它;

Installing package into ‘/home/samuel/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘xml2-config’ is not available (for R version 3.0.2)

我也试过安装那些:

> install.packages("libxml2-devel")
Installing package into ‘/home/samuel/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘libxml2-devel’ is not available (for R version 3.0.2)
> install.packages("libxml2-dev")
Installing package into ‘/home/samuel/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘libxml2-dev’ is not available (for R version 3.0.2)
> install.packages("libxml2")
Installing package into ‘/home/samuel/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘libxml2’ is not available (for R version 3.0.2)

我认为3.0.2是最新的R版本,我不认为它说我需要一个使用XML的软件包,它无法在R 3.0.2中实现

我已经在这里尝试了解决方案;

Unable to install R package in Ubuntu 11.04

我得到了这个

Reading package lists ... Done 
Building dependency tree 
Reading state information ... Done 
Might want to run 'apt-get f install' to correct these: 
The following packages have unmet dependencies: 
  libreoffice-core: Depends: libreoffice-common (> 1: 4.2.4) but it will not be installed 
  libreoffice-help-en-us: Depends: libreoffice-l10n-en-us 
  libreoffice-l10n-en-gb: Depends: libreoffice-common but it will not be installed 
  libreoffice-l10n-en-za: Depends: libreoffice-common but it will not be installed 
  libreoffice-l10n-en: Depends: libreoffice-common but it will not be installed 
E: Unmet dependencies. Try 'apt-get f install' with no packages (or specify a solution).

如果我输入“apt-get -f install”,它就无法工作,我得到了这个;

E: Could not open lock file '/ var / lib / dpkg / lock "- open (13: Permission denied) 
E: file replica "/ var / lib / dpkg / 'was not found

0 个答案:

没有答案