How do I get the package to the computer and how to install with apt?
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
apt is a package manager, not an internet downloader, it uses the sources.list file as places to search a package from. You can include non internet sources like a cd rom or a usb to install packages from there.
There is a special tool for that: apt-offline, available at: https://github.com/rickysarraf/apt-offline
In some places, such as Cuba, people make their own Debian mirrors.
General guide is in https://www.debian.org/mirror/ftpmirror and there are more instructions in the general script used.
Then you can point your
Another option, suggested in other comments, is downloading
*.debfiles manually for each package and dependency and performing an installation with
dpkg -i package.deb.
In a more specific approach, you have https://wiki.debian.org/DebianRepository/Setup.
Do you remember when you install a new Debian system and you can get packages from the CD ROM or USB stick? Debian can point to a repository in physical media, including a directory.
Generally, you can sync a hard drive with it outside with one of the tools available for this in this last wiki page, attach it to your puter when you arrive at home and party.
You can also define a local directory as apt source folder: https://askubuntu.com/questions/170348/how-to-create-a-local-apt-repository
@flag Have a look at askubuntu.com/questions/974/ho…
It’s a bit old and written for Ubuntu but at least some solutions should work on a current Debian, too.
Thank you that should be sufficient.
aptis the tool for downloading packages. So if you don’t have internet access
aptwon’t be very useful.
The command to install packages on debian is
dpkg. So if you download a Debian package (usually named
*.deb) you can install it with
dpkg -i $pkgas long as you have the dependencies installed. Of course you can also install the dependencies this way, so just make sure that you bring the package and all packages that it depends on to the target machine.
and all the packages those secondary packages require, back in the old days we called it Dependency Hell
Yes, you need to download all transitive dependencies.
But this isn’t dependency hell, it is just tedious. Dependency Hell is when your dependency tree requires two (or more) version of a single package so that not all of the dependencies can be satisfied.
Thanks. How do I download a package with apt? So that I can get it to the other computer?
On a computer that is online, you can say
apt install --download-only footo download (and not actually install) the .deb files for
fooand its dependencies to the directory
/var/cache/apt/archives/. You can then copy them from the online computer to the offline computer, and install them with
dpkg -i *deb(assuming the debs are in your current working directory). Note however that
apton the online computer will only download dependencies which aren’t already installed. To force re-downloading of a specific package which is already installed, you can say
apt install --reinstall --download-only foo.
Instead of downloading with
apt install --download-onlyyou could also find the download paths for individual .deb packages using https://packages.debian.org/foo and then download them using a browser.
You could also copy the contents of
apt update) and the contents of
/var/cache/apt/archives/both to the corresponding locations on the offline computer and, if your
sources.listfiles have the same entries, then you can offline install the things you’ve put in the cache folder using
Or, if you have lots of disk space, you can create an offline mirror of all (or some) of debian and point your
sources.listfile at a local
file:///source and then you can use
aptlike normal but completely offline.
I used to do this many years back with a USB stick before I had Internet access at home. I think it was only the sources.list file that I needed to copy around along with a config file and the actual .deb files. It was possible to use apt-get on the offline machine instead of dpkg which worked better.
you can find ubuntu packages at https://launchpad.net/ for download
Isn’t apt install ***.deb an alias for dpkg -i ? (Not on my computer so cannot check)
I don’t remember that working but I haven’t used Debian in years so it could be.