简体   繁体   中英

Error while installing R package in AWS

I am using a ubuntu AMI in my AWS and have launched a R studio server.

I am finding trouble in installing the R packages.

Whenever I try to install the packages I get an error

> Installing package into
> ‘/home/rstudio2/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 dependencies ‘jsonlite’, ‘mime’, ‘curl’,
> ‘openssl’, ‘R6’, ‘httr’, ‘base64enc’, ‘digest’, ‘aws.signature’
> 
> 
> The downloaded source packages are in
>   ‘/tmp/Rtmp1BrKS6/downloaded_packages’

Could anyone help me to backtrace the reason for error. Would be thankful, I have spent almost a day . could not figure out

dependency ‘xml2’ is not available

From this error, we can understand that package XML2 is missing. You need to install the system library libxml2-dev to install the XML2 package. So use the following command to install the package:

sudo apt install libxml2-dev

After this proceed with R package installation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM