Score:0

How to get packages from a Mac with internet to a Ubuntu 18.04 with no internet and installed properly?

ae flag

What am I trying to do?

On the Mac with internet access, I would like to have packages such as nvm, node, npm, wine32, etc. to be installed on the Linux (Ubuntu 18.04) with no internet. The packages will be transferred via burned on a CD.

Usually how in Windows a user downloads an .exe and transports that file to another computer and install there, essentially that is what I want to replicate.

What have I tried?

I've seen the https://packages.ubuntu.com website but get confused on the architecture download part. There is no specification on what architecture to get. When I click on the links for a particular download, say https://packages.ubuntu.com/bionic/i386/wine32/download, the link goes nowhere for me. There is no download for me. Sometimes I see packages ending in .deb or .tar.xz and unsure of which one to download.

In order:

  1. How do I properly get packages I need on the Mac to be ready to install on Linux? (Is there a proper website to use to download said packages or command line?)
  2. How do I install it on Linux using the terminal? (I've read around to do apt or dkpg?)
acfromspace avatar
ae flag
Soft of, I was able to download and install, but now I'm running into dependency fest where I download `wine32`, but it needs 2 dependencies, and so on and so forth. Is there a way to download everything in 1 packaged `.deb` file or something similar? I don't want to keep downloading individual packages until it works.
Score:0
in flag

One option would be to use the --download-only option with apt, which will include all of the dependencies required by packages. You will, however, need to first create a VM of 18.04 – ideally the very same version you've air-gapped – on your Mac.

The process would go something like this:

  1. Create a VM of Ubuntu 18.04 on the Mac using VirtualBox or another tool of your choice

  2. On the VM, open Terminal and download the packages you need:

    sudo apt --download-only -o Dir::Cache="/home/{user}/Downloads" \
     -o Dir::Cache::archives="./" install {package name}
    

    Although this will look like it's going to install the software, the --download-only option limits apt to just downloading the packages plus dependencies. The Dir::Cache option allows you to specify where you want the .deb files placed.

  3. Once you've obtained all of the packages that you need, copy the files to a USB stick or optical disc and install them on the air-gapped system:

    sudo apt install /path/to/package.deb
    

This can be annoying the first time but, if you are regularly working with air-gapped systems, this option will allow you to create predictable and consistent installation media which will continue working long after a version of Ubuntu is no longer supported.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.