📅  最后修改于: 2023-12-03 15:00:32.038000             🧑  作者: Mango
When installing a Debian package (.deb
file) using dpkg
, it also has dependencies that must be satisfied in order for the package installation to succeed. This tutorial will show you how to install a .deb
file with dependencies on the command line using dpkg
.
To follow this tutorial, you should have access to a terminal window with Shell/Bash installed on a Debian-based distribution, such as Ubuntu or Debian.
Download the .deb
file and save it to a directory on your system.
Open a terminal window and navigate to the directory where the .deb
file is located.
Run the following command to install the package and its dependencies:
sudo dpkg -i package-name.deb
sudo apt-get -f install
apt-get
with the -f
(or --fix-broken
) flag to fix any broken or missing dependencies that were not installed.If there were any missing dependencies, apt-get
will prompt you to install them. Type Y
to confirm and install the missing dependencies.
Once the dependencies have been installed successfully, you can verify that the package and its dependencies are installed correctly by running:
dpkg -s package-name
In this tutorial, you learned how to install a Debian package with its dependencies using dpkg
on the command line. By following these steps, you can ensure that all the required dependencies are installed and the package is installed correctly.