SoFunction
Updated on 2025-05-22

Several Ways to Install `.deb` Package on Ubuntu

Method 1: Use the dpkg command to install the .deb package

  • Open the terminal.

  • usedpkgCommand installation.debBag:

sudo dpkg -i /path/to/
  • Will/path/to/Replace with.debThe actual path to the file.

  • If dependency issues occur during installation, you can use the following command to fix the dependency:

sudo apt-get install -f
  • This will automatically install the required dependencies and complete.debPackage installation.

Method 2: Use the apt command to install the .deb package

aptCommands can automatically handle dependencies, avoiding dependency problems.

  • Open the terminal.

  • useaptInstall.debBag:

sudo apt install ./
  • Here./Refers to the current directory.debFiles can also use absolute paths.

Method 3: Use gdebi to install the .deb package

gdebiIt is a specially designed for installation.debFile tools that can automatically parse and install dependencies. If your system is not installedgdebi, can be installed through the following command:

sudo apt update
sudo apt install gdebi

After the installation is completed, use the following command to install.debBag:

sudo gdebi /path/to/

Method 4: Install the .deb package through the graphical interface

  1. Found in File Manager.debdocument.
  2. double click.debFiles, Ubuntu usually uses a package manager (such asUbuntu SoftwareorSoftware Install) Open it.
  3. Click the "Install" button and enter the administrator password to complete the installation.

Summarize

These methods can be installed on Ubuntu.debSoftware Package. useaptandgdebiInstall.debPackages will automatically handle dependencies and are usually recommended.

The above is the detailed content of several methods to install the `.deb` package on Ubuntu. For more information about installing the `.deb` package on Ubuntu, please follow my other related articles!