0

I am working in an airgapped environment where there is no internet.

I have a folder full of tar.gz files which I would like to install

Though all the dependencies of a package are also available, am not sure how to code them using R to identify the dependency and install them.

Currently am doing like below

install.packages("/home/user/packages/sys_3.4.tar.gz, repos = NULL, type = " source")
install.packages("/home/user/packages/askpass_1.1.tar.gz, repos = NULL, type = " source")

However, I was able to write above code because I tried installing 'askpass' first and it threw an error for missing dependency 'sys'. So, I am manually doing one by one.

Can experts here help me on how can I automate this using a for loop?

Mostly, the dependencies are present in the folder. If dependencies are present, it should search and install them before throwing an error.

I will not be able to do this manually for 200 folders/packages. So, can you help me?

The Great
  • 7,215
  • 7
  • 40
  • 128
  • have you tried this (https://github.com/MangoTheCat/blog_installing_packages) ? – Marcelo Avila Jun 23 '21 at 11:19
  • or this: https://stackoverflow.com/questions/10807804/offline-install-of-r-package-and-dependencies – Marcelo Avila Jun 23 '21 at 11:24
  • This is another related post that I created https://stackoverflow.com/questions/68860163/offline-installation-of-deb-packages-in-ubuntu-xenial-16-04. Can help me with this please? – The Great Aug 20 '21 at 09:55

0 Answers0