How to run a software in linux without installing it

binarytar

I am trying to run Rstudio download page link. On my Windows machine, I just downloaded the zip file from zip/tarballs section and was able to run .exe without installing anything on my machine.

I'd like to do this on my development university machine with limited rights. So I thought I could download the tarball, extract it and just run the binary, but I am not sure how to do that. Nothing I try is working.

1) Is there a way to just directly download the tarball and get Rstudio working by executing a binary?

2) If not, is there a way to install it without it being fussy or requiring sudo access?

I should also point out that my development machine has CentOS. (the download page dosnt really talk about it) Here is some information:

cat /etc/*-release
CentOS release 6.6 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)

I've tried using Ubuntu and fedora tarballs but no luck.

I should mention that by "running it directly" I mean, using X11 to forward the GUI to me. I should also mention that they offer Rstudio Server package which allows me to run Rstudio in my webbrowser. This would be the ideal case but I can't personally install it without sysadmin. If this is indeed the best solution, I will ask my supervisor as he owns the server.

edit: I noticed that it says Redhat 7+. Is this somehow related to the fact that I have CentOS6.6?

Best Answer

I thought I could download the tarball, extract it and just run the binary, but I am not sure how to do that.

You do occasionally see an app on Unix/Linux where someone has gone to the effort to make it portable (in the USB memory stick sense), but this is uncommon in the Unix world.

In this specific case, RStudio is miles away from being portable on Linux. The RPM version installs 1,378 files, many of which really are required for the program to run.

is there a way to install it without it being fussy or requiring sudo access?

A Unix binary app package is often tied to the file layout chosen at the time it was built from source. Those choices can get baked into the package at a difficult-to-modify level.

This isn't always the case. Sometimes you can tell the package manager to install the app somewhere else, but this is not the case with the RStudio RPMs:

$ rpm -ivh --prefix=$HOME rstudio-0.98.1091-x86_64.rpm
error: package rstudio is not relocatable

The standard way to cope with that is to build the software from source, using your preferences for file locations instead, but I've just tried it, and the current version of RStudio has at least one dependency you can't easily satisfy on RHEL/CentOS 6: Qt 4.8.0 or higher. (CentOS 6 is old enough that it still ships with Qt 4.6.2.) Qt is enough of a key library that having two versions on the same box gets tricky.

Even if that weren't the case, you probably also don't have one of the other build dependencies on the remote machine, such as the R development libraries or CMake.

I should mention that by "running it directly" I mean, using X11 to forward the GUI to me.

If you have a local machine capable of running X, why aren't you just running RStudio there? RStudio isn't the fanciest GUI in the world, but it's going to perform a lot better locally than forwarded over X.

If the issue is simply that your data lives on the remote machine, that's easily dealt with. (PDF, 35pp, 307 kiB)

I noticed that it says Redhat 7+. Is this somehow related to the fact that I have CentOS6.6?

It indicates that the page is being edited by someone who doesn't really understand Red Hat type Linuxes. Most likely, we're dealing with someone who spends most of their time on OS X or Ubuntu. The page has a couple of telltale errors often made by such people:

  1. There is no such thing as "RedHat 7". Way back at the tail end of the dot-com bubble there was a thing called Red Hat Linux 7, but that's not what they mean here. What they really mean is Red Hat Enterprise Linux 7, often abbreviated RHEL 7. Very different OSes, those two.

  2. They also list Fedora 13, which was contemporaneous with RHEL 6, not 7. Either they also actually require Fedora 19+ (the base from which RHEL 7 forked) or they shouldn't be requiring RHEL 7+, but instead 6+.

    Since the official RPMs install and appear to run on my CentOS 6 test VM, I'm guessing the latter case is the truth here. Fair warning, though: I only fired it up, I didn't try to make it do anything useful. When I run RStudio, I follow my own advice: I run it on my local desktop machine, not on a remote Linux machine over X.

    (If you're wondering how this success report squares with my caveat above about Qt 4.8+, the solution is that the RStudio RPM includes a private copy of Qt 4.8.0. Clearly their build system is not be a stock RHEL 6/Fedora 13 box.)

Related Question