0

On an off-line linux mint laptop, let's say I want to install PCL. I only can transfer files by USB. After reading documentation on installation it looks like installing compiling the code myself might be the easiest solution but what to do with all the dependencies needed ?

Also I want to check if there's not a more convenient way to install a package on an offline machine. For the moment I see two possible ways, one using the package manager and the other one which is compiling everything myself:

  • Download the code from github and all its dependencies. Compile everything.
  • Downloading the package from apt on a virtual machine with the same architecture, version, software installed and then transfer it to USB.

Any idea or suggestion would be much appreciated.

  • If PCL is available for your distribution, you're definitely better off using package managerment. But I don't understand what you mean by "Downloading the package from apt on a virtual machine with the same architecture, version, software installed and then transfer it to USB." What does a virtual machine have to do with it? – Faheem Mitha Sep 13 '17 at 17:42
  • See e.g. here for Debian, should work in Mint. (apt-offline, or direct download and dpkg -i). – dirkt Sep 13 '17 at 18:43
  • @FaheemMitha I wasn't very clear about it. I meant if I have to prepare all the dependencies for a given OS version I need to know which dependencies I need to install. So I thought about creating a similar machine and put on USB what it needed as dependencies. – Deewy Sep 14 '17 at 7:35
1

I would suggest looking into a tool called apt-offline as suggested by dirkt in the comments.

Other than that, you have two options:

  1. Build everything locally. This should be your last resort option if you're on almost anything that isn't Slackware or Gentoo derived (Slackware is designed to handle it, and it's trivial to get a Gentoo system to behave as if the package was installed through the package manager itself).
  2. Compile a list of dependencies, cross-check them with what's already on the target system, download the missing dependencies and the desired package, and just run them through dpkg directly.
  • Thanks for the suggestions, I think I'll go for a apt-offline combined with a backup .deb packages as @GeminiDakota suggested. – Deewy Sep 14 '17 at 7:40
0

Besides apt-offline (already mentioned).

I'd recommend downloading the programs you'd like as .deb files and their corresponding dependencies. Building the packages from source is not only time consuming, but potentially can cause version incompatibilities between programs. With your PC offline, attempt to install a program (mercurial for example):

  • sudo apt-get install mercurial

You should (eventually) get output of the dependencies and these should all be compatible, make sure to download them for your version of mint/ubuntu.

You can then go find the download page on Ubuntu's website:

Next, go to that packages download page and download from any mirror listed:

Lastly, once you have all the .deb files, transfer them to your offline PC. Then you can just install all of of the .deb files by using dpkg:

  • dpkg -i ~/Downloads/*.deb
  • Thanks for this solution, I think I will prepare your technique as well as a backup. I didn't mentioned that I can't have easy access to the off line laptop. – Deewy Sep 14 '17 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.