0
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"

Copyright (C) 2013 The R Foundation for Statistical Computing

Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.

> install.packages('devtools')

Installing package into ‘/home/kingslee/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)

Warning in install.packages :

  dependency ‘xml2’ is not available

also installing the dependency ‘rversions’

--2015-07-29 12:02:27-- 
https://cran.rstudio.com/src/contrib/rversions_1.0.2.tar.gz

Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.188.51

Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.188.51|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 4654 (4.5K) [application/x-gzip]

Saving to: ‘/tmp/Rtmpcd8fcf/downloaded_packages/rversions_1.0.2.tar.gz’

     0K ....                                                  100%  
540M=0s

2015-07-29 12:02:29 (540 MB/s) - 

‘/tmp/Rtmpcd8fcf/downloaded_packages/rversions_1.0.2.tar.gz’ saved [4654/4654]

--2015-07-29 12:02:29--  https://cran.rstudio.com/src/contrib/devtools_1.8.0.tar.gz

Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.188.51

Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.188.51|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 141487 (138K) [application/x-gzip]

Saving to: ‘/tmp/Rtmpcd8fcf/downloaded_packages/devtools_1.8.0.tar.gz’

     0K .......... .......... .......... .......... .......... 36%  388K 0s
    50K .......... .......... .......... .......... .......... 72%  487K 0s
   100K .......... .......... .......... ........             100%  440K=0.3s

2015-07-29 12:02:30 (434 KB/s) - 

‘/tmp/Rtmpcd8fcf/downloaded_packages/devtools_1.8.0.tar.gz’ saved [141487/141487]

ERROR: dependency ‘xml2’ is not available for package ‘rversions’

* removing ‘/home/kingslee/R/x86_64-pc-linux-gnu-library/3.0/rversions’
Warning in install.packages :

  installation of package ‘rversions’ had non-zero exit status

ERROR: dependency ‘rversions’ is not available for package ‘devtools’

* removing ‘/home/kingslee/R/x86_64-pc-linux-gnu-library/3.0/devtools’
Warning in install.packages :

  installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in

    ‘/tmp/Rtmpcd8fcf/downloaded_packages’
klee
  • 1,554
  • 2
  • 19
  • 31
  • Sorry, this place is reserved for _programming related question_. Yours looks more like a system administration question which should be asked over at the SuperUser sister page. You can see the link there in the footer of this page. – arkascha Jul 29 '15 at 07:03
  • Try `install.packages('devtools', dependencies = TRUE)`. –  Jul 29 '15 at 07:05
  • 1
    If possible, try updating your R version. – Roman Luštrik Jul 29 '15 at 07:07
  • 1
    @arkascha "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming." –  Jul 29 '15 at 07:13
  • @Pascal i tried with the commands you mentioned but the same error is thrown again – klee Jul 29 '15 at 09:48
  • @RomanLuštrik I updated the version for R but the above error is only noted and no other changes in it – klee Jul 29 '15 at 09:50

1 Answers1

0

You might to install that xml tool on the machine.

sudo apt-get -y install libxml2-dev

If that does indeed get rid of your error, you should follow this post for more instructions on how to get R properly set up on Ubuntu

DeanAttali
  • 25,268
  • 10
  • 92
  • 118