-1

I am trying to install packages on a remote windows machine with no internet connection using source packages. I am trying to follow the instructions given in an answer to the previous question

Offline install of R package and dependencies

I have a folder with .tar.gz files for the package and it's dependencies. I run the commands

library(tools)
write_PACKAGES()

which generates the PACKAGES and PACKAGES.gz in the same folder. However, my PACKAGES file is empty (with size 0 KB).

When I try to install the package using

install.packages("<PACKAGE_NAME>", contriburl = "file:///")

(I am in the same directory as all the source files), I am getting the following error

cannot open compressed file '//PACKAGES', probable reason 'No such file or directory'

I am not sure if there is something wrong with the way I specify the path or is it because my PACKAGES file is empty that I am getting this error.

Any help here would be great!

Additional info - The remote machine is a Windows machine and I have also tried deleting the PACKAGES.gz file before installing (as recommended in the link above), but did not succeed.

Thanks!

SN248

Satya
  • 1,708
  • 1
  • 15
  • 39
  • 1
    When I'm installing from local source I use `repo=NULL`. and of course I have a proper toolchain in place. (You said nothing about the second aspect.) – IRTFM Aug 02 '17 at 23:21
  • @42- Thanks for your comment. I am not sure I know about the proper toolchain. Could you elaborate on that? Thanks. – Satya Aug 02 '17 at 23:53
  • 1
    You can download windows binaries using the `type` argument in `download.packages`. This may be the easiest way to go. Take a look at the help file for more details. – lmo Aug 03 '17 at 13:21
  • This quest remains too vague. Please read [MCVE] and use the [edit] facilities to improve the question body. I don't really understand the configuration of a "remote" machine with "no Internet connection". No specifics about the packages or R versions are offered. No error messages are reported. No effort at looking up terms you don't understand. – IRTFM Aug 03 '17 at 14:46

1 Answers1

0

I was able to install the package that I wanted (package name = dplyr), using the hints in the comments above. I needed to change two things

  1. I downloaded windows binaries instead of source files, using type = "win.binary" parameter in the download.packages command.

  2. The path in contriburl = "file:///" needed to be changed to contriburl = "file:///<ABSOLUTE_PATH_TO_FOLDER_WITH_WIN_BINARIES>"

With these changes, the package installation went successfully.

Hope it helps others.

SN248

Satya
  • 1,708
  • 1
  • 15
  • 39