使用gdebi去解决安装deb包的时候软件依赖问题

概述

我以前都是这样去安装一个deb包的,首先直接安装这个包

sudo dpkg -i

之后可能会有依赖问题,所以

sudo apt install -f

这样虽然可以解决一些问题但是还不够方便

使用gdebi安装我们的deb包

首先我们安装gdebi

sudo apt install gdebi-core

之后我们可以尝试去安装一个包

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
➜  下载 sudo gdebi megacmd-xUbuntu_18.04_amd64.deb 
[sudo] bboysoul 的密码:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done

MEGA Command Line Interactive and Scriptable Application
MEGAcmd provides non UI access to MEGA services.
It intends to offer all the functionality
with your MEGA account via shell interaction.
It features 2 modes of interaction
- interactive. A shell to query your actions
- scriptable. A way to execute commands from a shell/a script/another program.
您是否想安装这个软件包?[y/N]:

在安装之前它就把所有的依赖给列出来了,以后就可以不用两步走了

欢迎关注Bboysoul的博客www.bboysoul.com
Have Fun