Installing Packages Without Internet Connection

Manually installing a package using GDebi

First of all: Don't blindly trust packages outside Trisquel's repository. Whoever built it may have included malware!

GDebi is installed by default on Trisquel GNU/Linux. GDebi is a simple tool to install deb files. It lets you install local deb packages resolving and installing its dependencies.

Using the graphical front end of GDebi

In this demonstration we are going to install htop that we were already downloaded.

  • Open the folder with the DEB package to install and double-click on it.

or

  • In the Main Menu go to Other→GDebi Package Installer
  • and select File→Open to select the DEB package

https://trisquel.info/files/install-package-with-gdebi-gtk1.png

  • If no error arises (e.g., unmet dependencies), click on the "Install Package" button.

https://trisquel.info/files/install-package-with-gdebi-gtk2.png

  • The package will now be installed

https://trisquel.info/files/install-package-with-gdebi-gtk3.png

  • Select "Close"

https://trisquel.info/files/install-package-with-gdebi-gtk4.png

  • After GDebi Package Installer finished the installation the window will look like this:

https://trisquel.info/files/install-package-with-gdebi-gtk5.png

  • You can now start the Application from the Main Menu, if possible

In our demo we are starting htop, the application we have installed. It will look like this:

https://trisquel.info/files/htop.png

Using GDebi in a terminal

If "gdebi-core" is installed or if you prefer the terminal (here assuming that the working directory contains "package.deb", to be substituted by the actual name of the DEB file): $ sudo gdebi package.deb

If "gdebi-core" is not installed, install it with the package manager when the system is online. If the system is offline for good, bring on it the DEB package of "gdebi-core" e.g., using a USB stick:

Then install it with the following command (here assuming that the working directory contains gdebi-core_0.9.5.7+nmu2_all.deb for Trisquel 11): $ sudo dpkg -i gdebi_0.9.5.7+nmu6_all.deb

Then use the 'gdebi' command to manually install any package (including "gdebi" to have its GUI). Notice that the use of 'sudo dpkg -i' to install any package is not recommended because it does not resolve unmet dependencies, i.e., it will install broken packages if some dependency is not installed. gdebi-core's dependencies are already installed. Even "trisquel-minimal", which provides a minimal console environment, depends on them.

However, if you meet unmet dependencies after that, and if your Trisquel have an internet access somehow, this command will resolve unmet dependencies automatically from Trisquel official repository:

$ sudo apt-get -f install

If your system is offline for weeks or more, GDebi is not the "proper" solution to administrates it. The proper solution is below.

Using a local apt repository

To create your own apt repository, that you can use later with apt, follow these instructions:

  • Create a directory for your own apt repository

 mkdir ~/apt-local-repository/
  • Append "deb [trusted=yes] file:/home/trisquel/apt-local-repository/ ./" to your sources.list where "trisquel" is your user name like this:

 sudo echo "deb [trusted=yes] file:/home/trisquel/apt-local-repository/ ./" | sudo  tee -a /etc/apt/sources.list
  • Place the deb packages in ~/apt-local-repository

or

  • To download a package when you are online along with its dependencies, run:

 cd ~/apt-local-repository; sudo apt-get --download-only -o=dir::Cache="./" -o=dir::Cache::archives="./" install package-name
where package-name is the package you want to download.

  • Generate package list which can be recognized by apt by running:

cd ~/apt-local-repository/; sudo apt-ftparchive packages . > Packages
Now, when you are offline, you can remove all online repositories in /etc/apt/sources.list and:

  • Update your package list by running:

sudo apt update
To install a package from your own repository just type:
sudo apt install package-name
where "package-name" is the name of the package you want to install

For later use, place the packages you want in "~/apt-local-repository/", update your package list and install the packages from your repository.

AttachmentSize
install-package-with-gdebi-gtk1.png23.08 KB
install-package-with-gdebi-gtk2.png39.75 KB
install-package-with-gdebi-gtk3.png44.35 KB
install-package-with-gdebi-gtk4.png45.55 KB
install-package-with-gdebi-gtk5.png43.13 KB
htop.png114.32 KB

Revisions

02/12/2014 - 00:43
antiesnob
09/04/2014 - 01:57
muhammed
11/29/2014 - 11:36
Pandya
12/27/2015 - 01:08
pogiako12345
01/28/2017 - 03:28
Magic Banana
01/28/2017 - 17:59
Peter Boughton
07/18/2018 - 17:06
Malsasa
11/05/2020 - 21:31
augustoborin
11/19/2023 - 09:44
knife