by TheOuterLinux (https://theouterlinux.gitlab.io)
Last updated: 2024/07/07
Use some of the following tips to help you get packages installed onto a system without working Internet.
To get a list of the links for DEB files to install all that you will need (hopefully) to get a package running, do something similar to the following in a terminal:
sudo apt update sudo apt -qq --print-uris install wine | cut -d\' -f 2 > urls.txt
This will create a file called "urls.txt" in the current directory with all of the links of DEB files needed to install WINE. The contents of this file will look something like this:
http://deb.debian.org/debian/pool/main/libs/libstb/libstb0_0.0%7egit20200713.b42009b%2bds-1_amd64.deb http://deb.debian.org/debian/pool/main/f/faudio/libfaudio0_21.02-1_amd64.deb http://deb.debian.org/debian/pool/main/v/vkd3d/libvkd3d1_1.1-5_amd64.deb http://deb.debian.org/debian/pool/main/w/wine/libwine_5.0.3-3_amd64.deb http://deb.debian.org/debian/pool/main/w/wine/wine64_5.0.3-3_amd64.deb http://deb.debian.org/debian/pool/main/w/wine/wine_5.0.3-3_all.deb
This way, you can easily download these packages on another computer if the current one does not have Internet access but was able to run 'sudo apt update' at least once. WGET can be ran from a list of URLs like so:
wget -i urls.txt
You would then 'cd' into the directory with these packages and run:
dpkg -i *.deb
...to install all of the packages.
You can also grab EVERYTHING from your APT-friendly distribution's repositories so that you never need to use the Internet to install software ever again, like so... Though, you will need a large hard drive for this.
You will need to download the 'apt-offline' package on the computer with working Internet and install it to both computers. For example, if you are using a Debian-based (Bullseye) distro, you would look here: https://packages.debian.org/bullseye/apt-offline
On the computer without Internet, run the following in a terminal:
sudo apt-offline set ~/my.sig
Copy the "~/my.sig" file to a USB hard drive and mount that hard drive to the computer with working Internet.
On the computer with working Internet, run the following in a terminal:
sudo apt-offline install "/path/to/downloaded/packages/folder"
...the "/path/to/..." part is where all of the DEBs are going to go.