Saturday, February 12, 2011

Installing R on Amazon Linux

When I wanted to run R (statistical software) on the Amazon "cloud", the first thing I found was this post explaining how to launch an Amazon EC2 "instance" (virtual machine) and pointing to an "image" (contains operating system and whatever else you want) that had Ubuntu and R.

Then I wanted 64-bit R, and it turned out that by far the easiest thing was to launch a Windows instance on Amazon EC2. I googled for an explanation, but it doesn't really need one. You launch a Windows instance, make sure the security group allows RDP, and connect with Remote Desktop. Works very smoothly. I could even connect with my phone.

But now I wanted to run R on a virtual machine which I could (for free) leave running all the time. For this I needed to run Amazon Linux on a "micro" instance, which ruled out both of the above. I launched a micro instance running Amazon Linux, and ssh'd into it.

Okay, now how do I install R?

I'll outline the process I went through. But I also went through a lot more confusion/frustration than I'll describe!

  • Can I use an automatic installer? Apt-get and yum seem to work for various people on the internet. But not for me! Oh well.
  • How do I get a file? Googled, found wget.
wget http://cran.at.r-project.org/src/base/R-2/R-2.12.1.tar.gz
  • How do I unzip this? Googled, found:
tar xf R-2.12.1.tar.gz
cd R-2.12.1

./configure
  • There's an error message! Google the error message to learn I need a C compiler. I had learned earlier that yum is for installing things, and googling reveals that gcc is a C compiler:
sudo yum install gcc
./configure
  • Another error message! Google the message to find that I need a C++ compiler. Maybe something like gcc will help...
yum search gcc
  • Yep! I now see gcc-c++, so I'll install that:
sudo yum install gcc-c++
./configure
  • Another error message! I need a fortran compiler. In the search above, I saw gcc-gfortran, so:
sudo yum install gcc-gfortran
./configure
  • Another error message! Google the message, revealing that I need readline-devel. I still don't know what that is, but this works:
sudo yum install readline-devel
./configure
  • Another error message! Google shows me a post from someone who seems a bit confused, but less confused than I am. Following the advice in that post (which seems like it will get me an incomplete R build, maybe with something related to windowing missing--but I won't be using windows anyway):
./configure --with-x=no
  • It works!
make
PATH=$PATH:~/R-2.12.1/bin/

R

  • Yippeee! I have R now. You can follow these steps, or I think you can use the public AMI I've created, AmazonLinuxWithR_c.

109 comments:

  1. You don't say which Linux you are using. I've been playing on EC2 for the last few weeks and was able to install R very easily on a Ubuntu 10.10 64 bit machine.

    ReplyDelete
  2. "Amazon Linux" seems to be their own special flavor.

    I don't think I was able to run Ubuntu on a micro instance. (I want to leave it running all the time, so this was my goal.)

    ReplyDelete
  3. Thanks for posting this -- it was a lifesaver. I think I solved the X11 library problem -- (perhaps by installing more than I needed, but nevertheless):

    sudo yum install libX11-devel.*
    sudo yum install libICE-devel.*
    sudo yum install libSM-devel.*
    sudo yum install libdmx-devel.*
    sudo yum install libx*
    sudo yum install xorg-x11*
    sudo yum install libFS*
    sudo yum install libX*

    ReplyDelete
  4. Please consider www.elasticr.net. It's awesome.

    ReplyDelete
  5. It's also worth noting that you should add

    sudo yum install make

    The Amazon Linux doesn't seem to include this either.

    ReplyDelete
  6. Thanks madcoverboy! I could swear that 'make' was already there the first time I tried this, but probably I'm wrong--just launched a new server, and it's not.

    Thanks Ed! After that, are you able to run R with windowing?

    ReplyDelete
  7. Very good points you wrote here..Great stuff...I think you've made some truly interesting points.Keep up the good work.
    Amazon

    ReplyDelete
  8. At the point when the thing sells, you at that point need to deal with bundling and transporting the thing to the purchaser, after which you will affirm by means of Amazon that the thing has been dispatched so the purchaser can be informed.Ecom Income Blueprint

    ReplyDelete
  9. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here. aws training in chennai

    ReplyDelete
  10. Amazon.com is America's biggest and best online retailer. Amazon completes three fold the amount of business as their nearest rival as far as online retail business, Staples.אינדקס אתרים

    ReplyDelete
  11. The blog is so charming. You can't avoid it.
    consigli prezzo

    ReplyDelete
  12. You put a couple of connections to formula books on your site. A peruser at your site taps on one of those connections and they get taken to Amazon through your exceptional connection. air conditioners review

    ReplyDelete
  13. online stumbled upon online casino advertising, all kinds of slot machines And I was glad to click on the link to see such a cool design and everything is clear where and how to play and what to press merely online casino now this is my favorite site

    ReplyDelete
  14. We are a part of the success story for many of our customer's successful cloud Migrations.
    Cloud Migration services

    Aws Cloud Migration services

    Azure Cloud Migration services

    ReplyDelete
  15. Thank you for the informative post about Security challenges in AWS , Found it useful . cloud migration services have now become secured and with no-risk
    Vmware Cloud Migration services

    Database Migration services

    ReplyDelete
  16. I am really impressed with the way of writing of this blog. The author has shared the info in a crisp and short way.
    Lia Infraservices

    ReplyDelete
  17. We are a part of the success story for many of our customer's successful cloud Migrations.
    Cloud Migration services


    Best Cloud Migration Tool

    ReplyDelete
  18. While model advancement is viewed as the center action in the entire procedure, perception and correspondence are essential to cause the client to comprehend the displayed information.ExcelR Data Science Courses

    ReplyDelete
  19. I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it..
    aluminum fence nashville tn

    ReplyDelete
  20. I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers.
    construction demolition san diego

    ReplyDelete
  21. I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers.
    remodeling contractors houston tx

    ReplyDelete
  22. Great article and a nice way to promote online. I’m satisfied with the information that you provided
    palm tree trimming palm beach gardens

    ReplyDelete
  23. Great article and a nice way to promote online. I’m satisfied with the information that you provided
    bathtub reglazing san diego

    ReplyDelete
  24. Great article and a nice way to promote online. I’m satisfied with the information that you provided
    kitchen & bath las vegas nv

    ReplyDelete
  25. Hi, This is nice article you shared great information i have read it thanks for giving such a wonderful Blog for reader.
    decorative concrete port st lucie

    ReplyDelete
  26. I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it..
    pool screen enclosures collier county

    ReplyDelete
  27. Thanks for a wonderful share. Your article has proved your hard work and experience you have got in this field. Brilliant .i love it reading.
    tree removal tampa

    ReplyDelete
  28. Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.

    Haroon Ullah

    ReplyDelete
  29. I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it.. Escort service new york

    ReplyDelete
  30. Yeah, running application in the cloud could be tricky, thanks for a guide!

    ReplyDelete
  31. Nice blog,I understood the topic very clearly,And want to study more like this.
    Data Scientist Course

    ReplyDelete
  32. Thanks for sharing your innovative ideas to our vision. Your Blog writing Skill is simply awesome with useful information, excellent work! I will get back here.
    Machine Learning Training In Hyderabad

    ReplyDelete
  33. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.

    Digital marketing course mumbai

    ReplyDelete
  34. This is the information that ive been looking for. Great insights & you have explained it really well. Thank you & looking
    Artificial Intelligence Training In Hyderabad

    Artificial Intelligence Course In Hyderabad

    ReplyDelete
  35. Great Blog! The concept has been explained very well. Thanks for sharing nice information
    Machine Learning Training in Hyderabad

    ReplyDelete
  36. Hi, Thanks for sharing wonderful content...

    For More:

    AI Training In Hyderabad

    ReplyDelete
  37. Regularly I am reading your blog, and I see a lot of engaging people sharing things.
    Machine Learning Training In Hyderabad

    ReplyDelete

  38. I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. I truly adored reading your posting. Thank you!
    best digital marketing course in mumbai

    ReplyDelete
  39. Nice Article.very impressed for this informative

    best digital marketing course

    ReplyDelete
  40. Thank you for sharing such a wonderful articles. Keep sharing
    AWS Training In Hyderabad

    ReplyDelete
  41. I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.

    data science course

    ReplyDelete
  42. Nice Blog ! It was really a nice article and i was really impressed by reading this. Thanks for sharing such detailed information.
    Data Science Training in Hyderabad

    ReplyDelete
  43. Informative post, i love reading such posts. Read my posts here
    Fdesports
    Laravel web development services
    Intensityesports

    ReplyDelete
  44. Good Article .Thanks for sharing nice articles
    AWS Training In Hyderabad

    ReplyDelete
  45. thanks for sharing nice information....
    more : https://www.kellytechno.com/Hyderabad/Course/Machine-Learning-Training-In-Hyderabad

    ReplyDelete
  46. Hey, i liked reading your article. You may go through few of my creative works here
    Marhabapilates
    Poppriceguide

    ReplyDelete
  47. I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon…
    Data Science Course in Bangalore

    ReplyDelete
  48. I am sure that this is going to help a lot of individuals. Keep up the good work. It is highly convincing and I enjoyed going through the entire blog.
    Data Science Training in Bangalore

    ReplyDelete
  49. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple linear regression

    ReplyDelete
  50. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!

    Simple Linear Regression

    Correlation vs Covariance

    ReplyDelete
  51. Very interesting blog. Many blogs I see these days do not really provide anything that attracts others, but believe me the way you interact is literally awesome.You can also check my articles as well.

    Data Science In Banglore With Placements
    Data Science Course In Bangalore
    Data Science Training In Bangalore
    Best Data Science Courses In Bangalore
    Data Science Institute In Bangalore

    Thank you..

    ReplyDelete
  52. Very interesting blog. Many blogs I see these days do not really provide anything that attracts others, but believe me the way you interact is literally awesome.You can also check my articles as well.

    Data Science In Banglore With Placements
    Data Science Course In Bangalore
    Data Science Training In Bangalore
    Best Data Science Courses In Bangalore
    Data Science Institute In Bangalore

    Thank you..

    ReplyDelete
  53. Really Very Infromative Post , Thanks For Sharing The Information With Us.
    Best AWS Training Institute in Hyderabad

    ReplyDelete
  54. Very interesting blog. Many blogs I see these days do not really provide anything that attracts others, but believe me the way you interact is literally awesome.You can also check my articles as well.

    Rowe Rowe
    Rowe Rowe
    Rowe Rowe
    Rowe Rowe

    Thank you..

    ReplyDelete
  55. I have read your blog and I gathered some new information through your blog. Thanks for sharing the information
    Data Science Training in Hyderabad

    ReplyDelete
  56. I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. I truly adored reading your posting. Thank you!

    Simple Linear Regression

    Correlation vs Covariance

    ReplyDelete
  57. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple linear regression
    data science interview questions

    ReplyDelete
  58. You have explained the concept really well. Was looking for this information from a while & luckily I stumbled upon your post. Looking forward for more of such informative updates from you

    Data Science Training In Hyderabad
    Data Science Course In Hyderabad

    ReplyDelete
  59. I was astounded after reading your post. I realize you 're really good at describing it. And I hope that after reading your post, other readers can know how I feel too.data science course

    ReplyDelete
  60. I like this post,And I figure that they making some incredible memories to scrutinize this post,they may take a good site to make an information,thanks for sharing it to me
    artificial intelligence course in noida

    ReplyDelete
  61. Every person, from a child to an 80-year-old man, use the facilities the technology has provided us. Along with this, the increase in population has also played a big role in the tremendous growth of information technology. data science course in hyderabad

    ReplyDelete
  62. Amazing Article ! I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple Linear Regression
    data science interview questions
    KNN Algorithm
    Logistic Regression explained

    ReplyDelete
  63. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.Best data science courses in hyerabad

    ReplyDelete
  64. It is good that you always notice the positive image of these types of topics but on the other hand if you need related assistance. I really love this post and hope to see such informative news furthermore. Keep it up. Guest Post

    ReplyDelete
  65. Very nice blogs!!! i have to learning for lot of information for this sites…Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing, data sciecne course in hyderabad

    ReplyDelete
  66. I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more. watch series

    ReplyDelete
  67. It doesn't make sense to spend that much pennies on using that when you can just have it also. I couldn't refer this a 'Leptitox killer'. You might have to be aware of all the fulfilling stuff you can do with this. best gaming

    ReplyDelete
  68. wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated. real estate closing gifts

    ReplyDelete
  69. Our academic pursuits, along with a range of extracurricular activities, help in honing a child's skills and ensuring that he/she grows to be a mature and responsible citizen. watch series

    ReplyDelete
  70. That is extremely useful for expanding my insight in this field. christmas

    ReplyDelete
  71. I am looking for and I love to post a comment that "The content of your post is awesome" Great work!

    Simple Linear Regression

    Correlation vs covariance

    KNN Algorithm

    Logistic Regression explained

    ReplyDelete
  72. The miracle thoughts are acceptable to look from the correct assistance line. I permit the harmony end to give the correct source on this perfect substance. A debt of gratitude is in order for this pleasant chance digital marketing company hongkong

    ReplyDelete
  73. I truly value the sort of points you post here. Much obliged for sharing us an incredible data that is really useful. Great day! digital marketing company hongkong

    ReplyDelete
  74. I am another client of this site so here I saw different articles and posts posted by this site,I inquisitive more enthusiasm for some of them trust you will give more data on this subjects in your next articles. online retailer

    ReplyDelete
  75. I was simply perusing through the web searching for some data and ran over your blog. I am dazzled by the data that you have on this blog. It shows how well you comprehend this subject. Bookmarked this page, will return for additional. gift

    ReplyDelete
  76. Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. Sarkari Naukri

    ReplyDelete
  77. Great article Lot's of information to Read...Great Man Keep Posting and update to People..Thanks Amy Coney Barrett

    ReplyDelete
  78. Hi I am so charmed I found your blog, I truly found you unintentionally, while I was watching on google for something different, Anyways I am here now and could simply prefer to state thank for a colossal post and an overall engaging site. Kindly keep up the incredible work. judi slot

    ReplyDelete
  79. A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. relationship

    ReplyDelete
  80. You really make it look so natural with your exhibition however I discover this issue to be really something which I figure I could never appreciate. It appears to be excessively confounded and amazingly wide for me. I'm searching forward for your next post, I'll attempt to get its hang! high DA

    ReplyDelete
  81. You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. Speedup Forex

    ReplyDelete
  82. Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks judi slot online

    ReplyDelete
  83. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. RRB Group D Admit Card

    ReplyDelete