8

I try to install packages (pdbDEMO actually and all the dependencies) and I am encountering an issue, that I cannot solve and I haven't found any solution about it.

I use the R command :

>install.packages("pbdDEMO", lib="C:/Users/xavier_520285/Desktop", type = "source")

Then all the 6 packages are downloaded, but not installed since I get 6 error messages :

Error in getOctD(x, offset, len) : invalid octal digit

I have absolutely no clue about how to fix it.

I would be very grateful with any helpful answer.

user2753495
  • 81
  • 1
  • 3
  • I have occasionally seen this; it seems to be some kind of file corruption issue, i.e. I have "solved" it by re-downloading/trying again. Good luck ... – Ben Bolker Sep 06 '13 at 11:07
  • Not better... Thanks anyway ! – user2753495 Sep 06 '13 at 13:10
  • Install **one** package at a time to see which one is throwing the error. Then, if nothing else, you could try building that one from the source tarball. – Carl Witthoft Sep 06 '13 at 15:29
  • 1
    that problem happens when the tar.gz is corrupted (for example when you try to download a tar.gz from github but not in raw format) check if the tar.gz is really a tar.gz otherwise redownload it – ntrax Dec 15 '14 at 09:08

3 Answers3

6

As the post above suggests, your tar file is probably corrupt, or it's not a tar file at all.

The easiest way to check it on Linux is to use file <filename> command, a proper .tar.gz file will return something like this:

rJava_0.9-4.tar.gz: gzip compressed data, from Unix, last modified: Tue Mar 12 09:54:30 2013

When you are behind a proxy or a firewall and you don't have it properly configured on your computer, oftentimes you will download a html file or a proxy script instead of the file that you are looking for. You can even try to read it as text with head or less:

# head rhdfs_1.0.5.tar.gz
/* NCSC PAC v1.271  */
var Pt;
var Pc;
var ihost;
var NAPROXY="133.183.234.11";
...
Dominik
  • 390
  • 3
  • 16
1

Are you doing this with a firewall perhaps? In my case the company's firewall was filtering the download, and ultimately, wget http://cran.fhcrc.org/src/contrib/gdata_2.17.0.tar.gz was downloading an html page from the firewall saying the download was blocked, but install.packages wasn't aware, it just knew that the file was not a valid tarball.

GL2014
  • 6,016
  • 4
  • 15
  • 22
0

I've come across this issue when using an incompatible (older) version of R/Rstudio. It's worth trying to install an older version of the package via devtools::install_version()

nolanp2
  • 51
  • 6