第一次尝试:
sudo apt install libpcap-dev
结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
libpcap-dev : Depends: libpcap0.8-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
好的,我应该安装 libpcap0.8-dev:
sudo apt install libpcap0.8-dev
结果:
The following packages have unmet dependencies.
libpcap0.8-dev : Depends: libpcap0.8 (= 1.8.1-6) but 1.8.1-6ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
所以我需要安装libpcap0.8:
sudo apt install libpcap0.8
结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpcap0.8 is already the newest version (1.8.1-6ubuntu1).
0 to upgrade, 0 to newly install, 0 to remove and 1377 not to upgrade.
太棒了!成功了,现在我要做的就是:
sudo apt install libpcap0.8-dev
结果:
The following packages have unmet dependencies.
libpcap0.8-dev : Depends: libpcap0.8 (= 1.8.1-6) but 1.8.1-6ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
哦。有什么想法吗?