Sometimes I want to install a program when offline. But apt-get
downloads as you install.
Is there a way to install a program, like you would install a .exe
, on Ubuntu?
Sometimes I want to install a program when offline. But apt-get
downloads as you install.
Is there a way to install a program, like you would install a .exe
, on Ubuntu?
You can use:
To download software and dependencies without installing them. The .deb files (pretty much equivalent to Windows .exe installers), are then downloaded to
/var/cache/apt/archives/
Unless you've issued
apt-get clean
pretty much anything you've ever installed via apt-get should have the .deb files stored there.Also you can install the .deb files via
dpgk -i
but you have to remember to install the dependencies (and their dependencies and so on), first. Or you should also just be able to double click a .deb file in your file browser and Software Center should take care of it for you.For example: I want to install
gedit
(which is included with Ubuntu normally so it won't download tons of dependency .deb files). But I have a system that, for whatever reason, doesn't have gedit and has no internet connect.So first, on a computer connected to the internet, I run
apt-get install --reinstall -d gedit
(because if you try runningapt-get install -d gedit
on a system with gedit already installed to the latest version it just tells you it is already installed), which then goes through the normal process of downloading the package (in this case there are no dependencies), and then stops.Then I locate the file under
/var/cache/apt/archives/
...... and move it to the computer which needs gedit installed and install it, in this case using the Software Center.
Or I could install it using
cd /var/cache/apt/archives
anddpkg -i gedit_3.10.4-0ubuntu4_amd64.deb