sunrat wrote:to install a locally downloaded package.
apt install is better than
dpkg -i as it will also resolve and download dependencies if there are any. eg. -
Code: Select all
apt install ./<downloaded-package>
Don't forget the ./ (or give the full path) so apt knows it's installing locally and not from repository.
Thank you for sharing this tip. I was unaware of it.
But my experiments with that command downloaded the package from the repository. They did not install from the local file. (See below).
So suppose that I built a backport. Under what conditions would the "dot-slash" installation method install my backport? and under what conditions would it install from the repository?
--------- --------- --------- ---------
Below are the results of my experiment with the (trivial)
hello package:
Code: Select all
# apt install ./hello_2.10-2_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'hello' instead of './hello_2.10-2_amd64.deb'
The following NEW packages will be installed:
hello
0 upgraded, 1 newly installed, 0 to remove and 30 not upgraded.
Need to get 56.1 kB of archives.
After this operation, 287 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 hello amd64 2.10-2 [56.1 kB]
Fetched 56.1 kB in 0s (444 kB/s)
Selecting previously unselected package hello.
(Reading database ... 311442 files and directories currently installed.)
Preparing to unpack .../hello_2.10-2_amd64.deb ...
Unpacking hello (2.10-2) ...
Setting up hello (2.10-2) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for install-info (6.5.0.dfsg.1-4+b1) ...
I also tried with
apt-get and obtained the same result:
Code: Select all
# apt-get install ./hello_2.10-2_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'hello' instead of './hello_2.10-2_amd64.deb'
The following NEW packages will be installed:
hello
0 upgraded, 1 newly installed, 0 to remove and 30 not upgraded.
Need to get 56.1 kB of archives.
After this operation, 287 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 hello amd64 2.10-2 [56.1 kB]
Fetched 56.1 kB in 0s (276 kB/s)
Selecting previously unselected package hello.
(Reading database ... 311442 files and directories currently installed.)
Preparing to unpack .../hello_2.10-2_amd64.deb ...
Unpacking hello (2.10-2) ...
Setting up hello (2.10-2) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for install-info (6.5.0.dfsg.1-4+b1) ...