0

I set up Rstudio on AmazonEC2. I am connected to the instance via PuTTY. To install packages like spdep, readtxt, splm, and dplyr.

I have tried

sudo -s 
sudo yum install spdep

However, I have this Error

Loaded plugins: priorities, update-motd, upgrade-helper
No package spdep available.

In mean time, when I code install.packages("spdep") on R console at the EC2 instance, I have error

ERROR: dependencies ‘classInt’, ‘units’ are not available for package ‘sf’
* removing ‘/home/henok/R/x86_64-redhat-linux-gnu-library/3.4/sf’
Warning in install.packages :
  installation of package ‘sf’ had non-zero exit status
ERROR: dependencies ‘sf’, ‘deldir’, ‘expm’ are not available for package ‘spdep’
* removing ‘/home/henok/R/x86_64-redhat-linux-gnu-library/3.4/spdep’
    Warning in install.packages :
      installation of package ‘spdep’ had non-zero exit status
The downloaded source packages are 
           in‘/tmp/RtmpMBCgvy/downloaded_packages’
Enrico Dace
  • 115
  • 10
  • @abhiieor I'm using PuTTY to install packages on EC2 according to AWS documentation since Rstudio on the cloud can't install the packages. – Enrico Dace Feb 19 '19 at 09:35
  • I have rstudio on cloud amazon. when I run , I got Same Error as I got it via PuTTY. @abhiieor please the edit – Enrico Dace Feb 19 '19 at 11:29
  • @abhiieor Followed both of your solutions, but same ERROR is happening and installation of package ‘spdep’ had non-zero exit status, what it really meant? – Enrico Dace Feb 19 '19 at 11:46
  • Are you sure this is all the output that you get? My guess would be that you don't have some system libraries installed, at which point some of the spdep dependencies fail and spdep fails, too. – Roman Luštrik Feb 19 '19 at 12:59
  • @RomanLuštrik What I displayed is the last 8-9 rows. Its huge to copy paste it here. wht do you guess about the 'uninstalled system libraries'? – Enrico Dace Feb 19 '19 at 15:40
  • Based on experience, some packages on linux require additional system libraries. See [here](https://stackoverflow.com/questions/20671814/non-zero-exit-status-r-3-0-1-xml-and-rcurl) for some ideas. – Roman Luštrik Feb 20 '19 at 11:30

1 Answers1

0

I switched to create a ''window instance' rather than Linux and a for a connection I have used a 'remote desktop connector' which is found by default in any windows 10. To successfully connect, please don't forget to make 'OFF firewall'', and to edit 'Inbound IP" to receive all incoming IP address (found in the instance setting). Once I have connected to the instance via RDC, then a simple run as if we sit in front windows 10. Then, I am able to install, R, R studio and run it. Then install.packages() as we do to rstudio desktop will be the next step. Now, I am able to run my stuff successfully with a 64GB RAM in the cloud.

Enrico Dace
  • 115
  • 10