If the package to install has been made available to you under the form of a simple .deb file without any associated package repository, it is still possible to use APT to install it together with its dependencies (provided that the dependencies are available in the configured repositories) with a simple command: apt install ./path-to-the-package.deb. The leading ./ is important to make it clear that we are referring to a filename and not to the name of a package available in one of the repositories.
dpkg -i <package_name>-<debian_version>.deb
apt install /path/to/<package_filename>.deb
dpkg -i …” 和 “
debi …”），它们不会自动处理所需的软件包依赖。 dpkg 的命令行选项 “
--force-all” 和类似的选项（参见 dpkg(1)）只适用于高手。没有完全理解它们的效果却使用它们会破坏你的整个系统。
There are two ways a system can get into a broken state like this. The first is caused by dpkg missing some subtle relationships between packages when performing upgrades. The second is if a package installation fails during an operation. In this situation a package may have been unpacked without its dependents being installed.
The second situation is much less serious than the first because APT places certain constraints on the order that packages are installed. In both cases supplying the -f option to apt-get will cause APT to deduce a possible solution to the problem and then continue on. The APT dselect method always supplies the -f option to allow for easy continuation of failed maintainer scripts.
However, if the -f option is used to correct a seriously broken system caused by the first case then it is possible that it will either fail immediately or the installation sequence will fail. In either case it is necessary to manually use dpkg (possibly with forcing options) to correct the situation enough to allow APT to proceed.
apt install ./path-to-the-package.deb。