当从命令行安装 deb 软件包时,您可以使用多种工具。在以下部分中,我们将向您展示如何使用apt, gdebi, and dpkg安装 deb 软件包的实用程序。
安装 deb 文件apt#
apt是一个命令行实用程序,用于在 Ubuntu、Debian 和相关 Linux 发行版上安装、更新、删除和以其他方式管理 deb 软件包。它在 Ubuntu 14.04 中引入,结合了最常用的命令apt-get and apt-cache.
安装本地 deb 包apt您需要提供 deb 文件的完整路径。如果该文件位于您的当前工作目录您可以在前面添加,而不是输入绝对路径./包名之前。否则,apt将尝试从 Ubuntu 的存储库检索并安装该软件包。
sudo apt install ./teamviewer_amd64.deb
系统将提示您输入Y接着说:
...
0 upgraded, 84 newly installed, 0 to remove and 64 not upgraded.
Need to get 21.0 MB of archives.
After this operation, 66.3 MB of additional disk space will be used.
Do you want to continue? [Y/n]