{"id":283,"date":"2009-10-11T23:46:17","date_gmt":"2009-10-12T04:46:17","guid":{"rendered":"http:\/\/www.thejuliagroup.com\/blog\/?p=283"},"modified":"2009-12-04T15:52:17","modified_gmt":"2009-12-04T20:52:17","slug":"installing-sas-for-linux-step-2-throw-away-the-documentation","status":"publish","type":"post","link":"https:\/\/www.thejuliagroup.com\/blog\/installing-sas-for-linux-step-2-throw-away-the-documentation\/","title":{"rendered":"Installing SAS for Linux &#8211; Step 2: Throw away the documentation"},"content":{"rendered":"<p><em>So you want to install SAS for Linux&#8230;.<\/em><\/p>\n<p>Step 1: Read the documentation for some hints on how to download and install the download \u00a0manager, and \u00a0the SAS software depot\u00a0(if you are the SAS administrator).<\/p>\n<p>Step 2 : Throw away the documentation. It will just confuse you after this point and it doesn&#8217;t help anyway.<\/p>\n<p>I had installed SAS on a Ubuntu operating system once before, on a virtual machine running on Virtual Box running on an older computer in my office that has Windows XP. I couldn&#8217;t remember how I did it except that I ended up literally throwing away the documentation and just using Google to figure it out. \u00a0Then I deleted the virtual machine later when I needed space on that computer.<\/p>\n<p>This weekend I installed SAS on the computer in the living room that runs Linux. My husband received the computer for $100 in some raffle or something. It was a bit of a dilemma at first, because our other six computers are Macs and Dennis equates Windows with the anti-Christ, but, after a few minutes thought, he installed Ubuntu and all has been well, barring a few arm-wrestling matches with the little one over whether she was going to get to use it for Club Penguin or he was going to be able to use it for programming.<\/p>\n<p>The \u00a0good news is downloading the download manager and installing the SAS software depot was a piece of cake. I followed the instructions on the SAS install site and everything worked perfectly. It took a few hours to download, which was a bit surprising to me, since we just had FiOS installed on the promise of speeding things up, but for once no one tripped over a cord and disconnected the computer, spelled coke on the keyboard or any of those other things that always seem to happen when you are right in the middle of something.<\/p>\n<p>I created the DVDs from the SAS software depot but they did not work. By &#8220;they did not work&#8221;, I mean that when I popped in the DVD and ran sudo \/cdrom\/setup.sh \u00a0 instead of giving me three options, one of which was to install the software, it launched right into creating a new software depot on the computer where I already had a software depot from which I had created the DVDs in the first place. Sort of an annoying Escher-type loop. \u00a0FAIL !<\/p>\n<p>If I was more of my usual self I would have been determined to figure this out, but, unfortunately, I only have about 10 or 11 productive hours when I am not in too much pain to work (this sucks) so I decided to go ahead and use the software depot which was installed and actually DID give me three options. So, here is what I did after having downloaded the software depot, and it did work.<\/p>\n<p>LOG IN WITH ROOT ACCESS<\/p>\n<p><strong>1. cd\u00a0to to the directory<\/strong> where your software depot is located, e.g.,<\/p>\n<p>cd \/usr\/local\/SAS\/<\/p>\n<p><strong>2. Make sure your default shell is bash<\/strong><\/p>\n<p>(If your default shell is NOT bash, in my case it was dash, you will get a message that says:<\/p>\n<p><em>\/bin\/sh: illegal option -p<\/em><\/p>\n<p>Since the pain medication is eating about 40% of my brain as well as a good bit of my productive hours (this sucks), I passed the problem along to the Windows-hating Dennis when he got home from the lab. He emailed me the following from the upstairs bedroom \u00a0&#8230;.<\/p>\n<p>In order to install SAS components without the &#8220;\/bin\/sh: illegal option -p&#8221; error which stops installation, \u00a0your \/bin\/sh file must be pointing to bash.<\/p>\n<p>To check this, in the terminal execute the command:<\/p>\n<p>ls -l \/bin\/sh<\/p>\n<p>The line you get in return should end in something like:<\/p>\n<p>sh -&gt; \/bin\/bash<\/p>\n<p>if it just ends in sh, or something like sh -&gt; \/bin\/dash, you need to replace it with a symbolic link to bash. To do this, execute the two following lines:<\/p>\n<p>sudo rm \u00a0\/bin\/sh<br \/>\nsudo ln \u00a0-s \u00a0\/bin\/bash \u00a0\/bin\/sh<\/p>\n<p>3. <strong>Type \u00a0sudo .\/setup.sh<\/strong><\/p>\n<p>give your password<\/p>\n<p>Just click along with the next screens and SAS should install no problem.<\/p>\n<p>(The SAS documentation says to just type .\/setup.sh \u00a0but in my case that tells me I don&#8217;t have permission.)<\/p>\n<p>Actually compared to the problems we had early on with SAS 9.2 for Windows, this was relatively pain free.<\/p>\n<p><strong>Running SAS<\/strong><\/p>\n<p>You need to create a work directory and assign it when you run SAS. I went to my home directory and created a directory named tmp.<\/p>\n<p>mkdir tmp<\/p>\n<p>Then, to invoke SAS, I did this<\/p>\n<p>usr\/local\/SAS\/SASFoundation\/SAS92\/9.2\/sas -work tmp<\/p>\n<p>and SAS started up just happy as could be.<\/p>\n<p>Of course, at this point, three things occur to me.<\/p>\n<ol>\n<li>I had no data on this computer and no actual need for SAS on it at the moment, I just wanted to see if I could install it and get it to run.<\/li>\n<li>There must be something like a .login file where I can set the path and don&#8217;t need to specify the full path each time.<\/li>\n<li>I have yet to install SAS on Linux from DVDs. The last time I did it from an external disk drive that had the software depot on it.<\/li>\n<\/ol>\n<p>Also, there was no Enterprise Guide and no Power and Sample Size application. Not sure if SAS does not make those for Linux or they just weren&#8217;t part of our license.<\/p>\n<p>So, there you have it. SAS for Linux. Except for the little bash\/ dash episode, it really wasn&#8217;t much trouble at all. We only have one person outside our department who wants to install it (the other three used the same external drive that I did), so I think I will just copy the software depot on to a flash drive and send it to him.<\/p>\n<p>Maybe I&#8217;ll figure out the DVD thing when I feel better (this sucks) or much more likely I&#8217;ll give them to my wonderful assistant and have her figure it out while I write up my lectures for next week on calculating various effect sizes with SPSS, SAS Enterprise Guide for Data Management &amp; Statistics and Basic Statistics using SPSS 14 (yes, unbelievably, we actually had a request for a class on that!)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you want to install SAS for Linux&#8230;. Step 1: Read the documentation for some hints on how to download and install the download \u00a0manager, and \u00a0the SAS software depot\u00a0(if you are the SAS administrator). Step 2 : Throw away the documentation. It will just confuse you after this point and it doesn&#8217;t help anyway&#8230;.<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[],"class_list":["post-283","post","type-post","status-publish","format-standard","hentry","category-software"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/comments?post=283"}],"version-history":[{"count":5,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/283\/revisions"}],"predecessor-version":[{"id":319,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/283\/revisions\/319"}],"wp:attachment":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/media?parent=283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/categories?post=283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/tags?post=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}