Installing R (A language and environment for statistical computing and graphics) on Debian GNU/Linux

  • How to tell the Debian/Ubuntu tools where to look for the R packages (a line in /etc/apt/sources.list)
    e.i. deb lenny-cran/
  • $sudo apt-get update
  • If you get following error while running the above command

    GPG error: lenny-cran/ Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 06F90DE5381BA480

    Do the following steps:

    1. you can search for the key at and copy it into a plain text file, named, for instance, jranke_cran.asc
    2. Entering “0x381BA480” (NB the prefix “0x” which has to be added to the key “381BA480” as given in CRAN) as the search string, and clicking on “Submit Query” initially gave
    3. pub 1024D/381BA480 2007-02-15 Johannes Ranke (CRAN Debian archive) Fingerprint=6212 B7B7 931C 4BB1 6280 BA13 06F9 0DE5 381B A480″
    4. Clicking on the highlighted “381BA480” in the above then returned

      Version: SKS 1.1.0
    5. which duly copied into “ranke_cran.asc” (all of it, including the header abd trailer). Then the recommended command
      $apt-key add jranke_cran.asc
  • Install the most recent R version

    $sudo apt-get install r-base-dev r-recommended
  • Install Java Development Kit

    $sudo apt-get install sun-java6-jdk
  • Enable Java support in R

    $sudo R CMD javareconf
    $sudo R CMD javareconf JAVA_HOME=/home/shekhar/packages/jdk1.6.0_16
  • Install JGR

    sudo R
    > install.packages(‘JGR’)
    > library(JGR)
    > JGR()
    quit R
  • Update JGR

    $sudo R
    > library(JGR)
    > JGR(update=TRUE)
  • Run once more R as root user to write all script files

    $sudo R
    > library(JGR)
    > JGR()


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: