apt 安装正常,但直接使用 dpkg 失败

apt 安装正常,但直接使用 dpkg 失败

网络搜索发现使用 apt 时 dpkg 的链接失败。这apt-get 和 dpkg 有什么区别?接受的答案说:

apt-get 使用 dpkg 进行实际的软件包安装。

dpkg -i /path/*.deb我在安装时遇到了一种情况bless,我尝试重现:从 liveUSB (Linux Mint 20.2) 启动并遇到类似的错误,但是当我启动 liveUSB 并使用时apt install bless,安装顺利进行。我检查了debs下载者的列表 - 该列表包含与我尝试通过安装的apt文件相同的文件(至少按名称,我最近也获得debsdpkg)。为什么安装正常,直接使用却失败?我已经通过几个软件包安装了,但都失败了。apt install -ddpkgaptdpkgapt install -ddpkg -i /path/*.debbless

以下是两种方式的输出:

DPKG 失败:

mint@mint:~$ sudo dpkg -i /home/mint/Downloads/*.deb
Selecting previously unselected package binfmt-support.
(Reading database ... 282124 files and directories currently installed.)
Preparing to unpack .../binfmt-support_2.2.0-2_amd64.deb ...
Unpacking binfmt-support (2.2.0-2) ...
Selecting previously unselected package bless.
Preparing to unpack .../bless_0.6.0-7_all.deb ...
Unpacking bless (0.6.0-7) ...
Selecting previously unselected package ca-certificates-mono.
dpkg: regarding .../ca-certificates-mono_6.8.0.105+dfsg-2_all.deb containing ca-certificates-mono, pre-dependency problem:
 ca-certificates-mono pre-depends on mono-runtime-common (>= 5.20)
  mono-runtime-common is not installed.

dpkg: error processing archive /home/mint/Downloads/ca-certificates-mono_6.8.0.105+dfsg-2_all.deb (--install):
 pre-dependency problem - not installing ca-certificates-mono
Selecting previously unselected package cli-common.
Preparing to unpack .../cli-common_0.10_all.deb ...
Unpacking cli-common (0.10) ...
Selecting previously unselected package libgdiplus.
Preparing to unpack .../libgdiplus_6.0.4+dfsg-2_amd64.deb ...
Unpacking libgdiplus (6.0.4+dfsg-2) ...
Selecting previously unselected package libglade2-0:amd64.
Preparing to unpack .../libglade2-0_1%3a2.6.4-2ubuntu2_amd64.deb ...
Unpacking libglade2-0:amd64 (1:2.6.4-2ubuntu2) ...
Selecting previously unselected package libglade2.0-cil.
Preparing to unpack .../libglade2.0-cil_2.12.40-3_amd64.deb ...
Unpacking libglade2.0-cil (2.12.40-3) ...
Selecting previously unselected package libglib2.0-cil.
Preparing to unpack .../libglib2.0-cil_2.12.40-3_amd64.deb ...
Unpacking libglib2.0-cil (2.12.40-3) ...
Selecting previously unselected package libgtk2.0-cil.
Preparing to unpack .../libgtk2.0-cil_2.12.40-3_amd64.deb ...
Unpacking libgtk2.0-cil (2.12.40-3) ...
Selecting previously unselected package libmono-btls-interface4.0-cil.
Preparing to unpack .../libmono-btls-interface4.0-cil_6.8.0.105+dfsg-2_amd64.deb ...
Unpacking libmono-btls-interface4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-cairo4.0-cil.
Preparing to unpack .../libmono-cairo4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-cairo4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-corlib4.5-cil.
Preparing to unpack .../libmono-corlib4.5-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-corlib4.5-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-i18n-west4.0-cil.
Preparing to unpack .../libmono-i18n-west4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-i18n-west4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-i18n4.0-cil.
Preparing to unpack .../libmono-i18n4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-i18n4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-posix4.0-cil.
Preparing to unpack .../libmono-posix4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-posix4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-security4.0-cil.
Preparing to unpack .../libmono-security4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-security4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-configuration4.0-cil.
Preparing to unpack .../libmono-system-configuration4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-system-configuration4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-core4.0-cil.
Preparing to unpack .../libmono-system-core4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-system-core4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-drawing4.0-cil.
Preparing to unpack .../libmono-system-drawing4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-system-drawing4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-numerics4.0-cil.
Preparing to unpack .../libmono-system-numerics4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-system-numerics4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-security4.0-cil.
Preparing to unpack .../libmono-system-security4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-system-security4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-xml4.0-cil.
Preparing to unpack .../libmono-system-xml4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-system-xml4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system4.0-cil.
Preparing to unpack .../libmono-system4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-system4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package mono-4.0-gac.
Preparing to unpack .../mono-4.0-gac_6.8.0.105+dfsg-2_all.deb ...
Unpacking mono-4.0-gac (6.8.0.105+dfsg-2) ...
Selecting previously unselected package mono-gac.
Preparing to unpack .../mono-gac_6.8.0.105+dfsg-2_all.deb ...
Unpacking mono-gac (6.8.0.105+dfsg-2) ...
Selecting previously unselected package mono-runtime-common.
Preparing to unpack .../mono-runtime-common_6.8.0.105+dfsg-2_amd64.deb ...
Unpacking mono-runtime-common (6.8.0.105+dfsg-2) ...
Selecting previously unselected package mono-runtime-sgen.
Preparing to unpack .../mono-runtime-sgen_6.8.0.105+dfsg-2_amd64.deb ...
Unpacking mono-runtime-sgen (6.8.0.105+dfsg-2) ...
Selecting previously unselected package mono-runtime.
Preparing to unpack .../mono-runtime_6.8.0.105+dfsg-2_amd64.deb ...
Unpacking mono-runtime (6.8.0.105+dfsg-2) ...
Setting up binfmt-support (2.2.0-2) ...
update-binfmts: warning: /usr/share/binfmts/cli: no executable /usr/bin/cli found, but continuing anyway as you request
Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service.
Setting up cli-common (0.10) ...
Setting up libgdiplus (6.0.4+dfsg-2) ...
Setting up libglade2-0:amd64 (1:2.6.4-2ubuntu2) ...
Setting up libmono-btls-interface4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system-numerics4.0-cil (6.8.0.105+dfsg-2) ...
Setting up mono-runtime-sgen (6.8.0.105+dfsg-2) ...
Setting up mono-runtime (6.8.0.105+dfsg-2) ...
update-alternatives: using /usr/bin/mono to provide /usr/bin/cli (cli) in auto mode
Setting up libmono-corlib4.5-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-i18n4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-security4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libglib2.0-cil (2.12.40-3) ...

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: System.Native assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
  at Interop+Sys..cctor () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
   --- End of inner exception stack trace ---
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x0000f] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at System.IO.File.Exists (System.String path) [0x00058] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00031] in <c1f3f44c980c4c748aff61945c8f618f>:0 
  at Mono.Tools.Driver.Main (System.String[] args) [0x00347] in <c1f3f44c980c4c748aff61945c8f618f>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: System.Native assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
  at Interop+Sys..cctor () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
   --- End of inner exception stack trace ---
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x0000f] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at System.IO.File.Exists (System.String path) [0x00058] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 
  at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00031] in <c1f3f44c980c4c748aff61945c8f618f>:0 
  at Mono.Tools.Driver.Main (System.String[] args) [0x00347] in <c1f3f44c980c4c748aff61945c8f618f>:0 
E: installing Assembly /usr/share/cli-common/policies.d/libglib2.0-cil/policy.2.8.glib-sharp.dll failed
E: Installation of policy.2.8.glib-sharp with /usr/share/cli-common/runtimes.d/mono failed
dpkg: error processing package libglib2.0-cil (--install):
 installed libglib2.0-cil package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of libgtk2.0-cil:
 libgtk2.0-cil depends on libglib2.0-cil (= 2.12.40-3); however:
  Package libglib2.0-cil is not configured yet.

dpkg: error processing package libgtk2.0-cil (--install):
 dependency problems - leaving unconfigured
Setting up libmono-cairo4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-i18n-west4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-posix4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system-core4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system-drawing4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system-xml4.0-cil (6.8.0.105+dfsg-2) ...
dpkg: dependency problems prevent configuration of bless:
 bless depends on libglib2.0-cil (>= 2.12.40); however:
  Package libglib2.0-cil is not configured yet.
 bless depends on libgtk2.0-cil (>= 2.12.40); however:
  Package libgtk2.0-cil is not configured yet.

dpkg: error processing package bless (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libglade2.0-cil:
 libglade2.0-cil depends on libglib2.0-cil (>= 2.12.40); however:
  Package libglib2.0-cil is not configured yet.
 libglade2.0-cil depends on libgtk2.0-cil (>= 2.12.40); however:
  Package libgtk2.0-cil is not configured yet.

dpkg: error processing package libglade2.0-cil (--install):
 dependency problems - leaving unconfigured
Setting up libmono-system-security4.0-cil (6.8.0.105+dfsg-2) ...
Setting up mono-4.0-gac (6.8.0.105+dfsg-2) ...
Setting up mono-gac (6.8.0.105+dfsg-2) ...
update-alternatives: using /usr/bin/gacutil to provide /usr/bin/cli-gacutil (global-assembly-cache-tool) in auto mode
Setting up mono-runtime-common (6.8.0.105+dfsg-2) ...
Setting up libmono-system-configuration4.0-cil (6.8.0.105+dfsg-2) ...
Processing triggers for systemd (245.4-4ubuntu3.6) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24+linuxmint1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for sgml-base (1.29.1) ...
Errors were encountered while processing:
 /home/mint/Downloads/ca-certificates-mono_6.8.0.105+dfsg-2_all.deb
 libglib2.0-cil
 libgtk2.0-cil
 bless
 libglade2.0-cil

通过 APT 安装 OK(已使用 -d 选项下载)

mint@mint:~/Downloads$ sudo apt install bless
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  binfmt-support ca-certificates-mono cli-common libgdiplus libglade2-0
  libglade2.0-cil libglib2.0-cil libgtk2.0-cil libmono-btls-interface4.0-cil
  libmono-cairo4.0-cil libmono-corlib4.5-cil libmono-i18n-west4.0-cil
  libmono-i18n4.0-cil libmono-posix4.0-cil libmono-security4.0-cil
  libmono-system-configuration4.0-cil libmono-system-core4.0-cil
  libmono-system-drawing4.0-cil libmono-system-numerics4.0-cil
  libmono-system-security4.0-cil libmono-system-xml4.0-cil
  libmono-system4.0-cil mono-4.0-gac mono-gac mono-runtime mono-runtime-common
  mono-runtime-sgen
Suggested packages:
  monodoc-gtk2.0-manual libmono-i18n4.0-all libgamin0
The following NEW packages will be installed:
  binfmt-support bless ca-certificates-mono cli-common libgdiplus libglade2-0
  libglade2.0-cil libglib2.0-cil libgtk2.0-cil libmono-btls-interface4.0-cil
  libmono-cairo4.0-cil libmono-corlib4.5-cil libmono-i18n-west4.0-cil
  libmono-i18n4.0-cil libmono-posix4.0-cil libmono-security4.0-cil
  libmono-system-configuration4.0-cil libmono-system-core4.0-cil
  libmono-system-drawing4.0-cil libmono-system-numerics4.0-cil
  libmono-system-security4.0-cil libmono-system-xml4.0-cil
  libmono-system4.0-cil mono-4.0-gac mono-gac mono-runtime mono-runtime-common
  mono-runtime-sgen
0 upgraded, 28 newly installed, 0 to remove and 71 not upgraded.
Need to get 0 B/8195 kB of archives.
After this operation, 29.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package mono-runtime-sgen.
(Reading database ... 282124 files and directories currently installed.)
Preparing to unpack .../00-mono-runtime-sgen_6.8.0.105+dfsg-2_amd64.deb ...
Unpacking mono-runtime-sgen (6.8.0.105+dfsg-2) ...
Selecting previously unselected package mono-runtime.
Preparing to unpack .../01-mono-runtime_6.8.0.105+dfsg-2_amd64.deb ...
Unpacking mono-runtime (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-corlib4.5-cil.
Preparing to unpack .../02-libmono-corlib4.5-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-corlib4.5-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-core4.0-cil.
Preparing to unpack .../03-libmono-system-core4.0-cil_6.8.0.105+dfsg-2_all.deb .
..
Unpacking libmono-system-core4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-numerics4.0-cil.
Preparing to unpack .../04-libmono-system-numerics4.0-cil_6.8.0.105+dfsg-2_all.d
eb ...
Unpacking libmono-system-numerics4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-xml4.0-cil.
Preparing to unpack .../05-libmono-system-xml4.0-cil_6.8.0.105+dfsg-2_all.deb ..
.
Unpacking libmono-system-xml4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-security4.0-cil.
Preparing to unpack .../06-libmono-system-security4.0-cil_6.8.0.105+dfsg-2_all.d
eb ...
Unpacking libmono-system-security4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system-configuration4.0-cil.
Preparing to unpack .../07-libmono-system-configuration4.0-cil_6.8.0.105+dfsg-2_
all.deb ...
Unpacking libmono-system-configuration4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-system4.0-cil.
Preparing to unpack .../08-libmono-system4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-system4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-security4.0-cil.
Preparing to unpack .../09-libmono-security4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-security4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package mono-4.0-gac.
Preparing to unpack .../10-mono-4.0-gac_6.8.0.105+dfsg-2_all.deb ...
Unpacking mono-4.0-gac (6.8.0.105+dfsg-2) ...
Selecting previously unselected package mono-gac.
Preparing to unpack .../11-mono-gac_6.8.0.105+dfsg-2_all.deb ...
Unpacking mono-gac (6.8.0.105+dfsg-2) ...
Selecting previously unselected package mono-runtime-common.
Preparing to unpack .../12-mono-runtime-common_6.8.0.105+dfsg-2_amd64.deb ...
Unpacking mono-runtime-common (6.8.0.105+dfsg-2) ...
Setting up libmono-security4.0-cil (6.8.0.105+dfsg-2) ...
Setting up mono-runtime-sgen (6.8.0.105+dfsg-2) ...
Setting up mono-runtime (6.8.0.105+dfsg-2) ...
update-alternatives: using /usr/bin/mono to provide /usr/bin/cli (cli) in auto m
ode
Setting up libmono-corlib4.5-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system-numerics4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system-configuration4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system-xml4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system-core4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-system-security4.0-cil (6.8.0.105+dfsg-2) ...
Setting up mono-4.0-gac (6.8.0.105+dfsg-2) ...
Setting up mono-gac (6.8.0.105+dfsg-2) ...
update-alternatives: using /usr/bin/gacutil to provide /usr/bin/cli-gacutil (global-assembly-cache-tool) in auto mode
Setting up mono-runtime-common (6.8.0.105+dfsg-2) ...
Selecting previously unselected package ca-certificates-mono.
(Reading database ... 282258 files and directories currently installed.)
Preparing to unpack .../00-ca-certificates-mono_6.8.0.105+dfsg-2_all.deb ...
Unpacking ca-certificates-mono (6.8.0.105+dfsg-2) ...
Selecting previously unselected package binfmt-support.
Preparing to unpack .../01-binfmt-support_2.2.0-2_amd64.deb ...
Unpacking binfmt-support (2.2.0-2) ...
Selecting previously unselected package cli-common.
Preparing to unpack .../02-cli-common_0.10_all.deb ...
Unpacking cli-common (0.10) ...
Selecting previously unselected package libglade2-0:amd64.
Preparing to unpack .../03-libglade2-0_1%3a2.6.4-2ubuntu2_amd64.deb ...
Unpacking libglade2-0:amd64 (1:2.6.4-2ubuntu2) ...
Selecting previously unselected package libglib2.0-cil.
Preparing to unpack .../04-libglib2.0-cil_2.12.40-3_amd64.deb ...
Unpacking libglib2.0-cil (2.12.40-3) ...
Selecting previously unselected package libmono-cairo4.0-cil.
Preparing to unpack .../05-libmono-cairo4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-cairo4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libgdiplus.
Preparing to unpack .../06-libgdiplus_6.0.4+dfsg-2_amd64.deb ...
Unpacking libgdiplus (6.0.4+dfsg-2) ...
Selecting previously unselected package libmono-system-drawing4.0-cil.
Preparing to unpack .../07-libmono-system-drawing4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-system-drawing4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libgtk2.0-cil.
Preparing to unpack .../08-libgtk2.0-cil_2.12.40-3_amd64.deb ...
Unpacking libgtk2.0-cil (2.12.40-3) ...
Selecting previously unselected package libglade2.0-cil.
Preparing to unpack .../09-libglade2.0-cil_2.12.40-3_amd64.deb ...
Unpacking libglade2.0-cil (2.12.40-3) ...
Selecting previously unselected package libmono-posix4.0-cil.
Preparing to unpack .../10-libmono-posix4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-posix4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package bless.
Preparing to unpack .../11-bless_0.6.0-7_all.deb ...
Unpacking bless (0.6.0-7) ...
Selecting previously unselected package libmono-btls-interface4.0-cil.
Preparing to unpack .../12-libmono-btls-interface4.0-cil_6.8.0.105+dfsg-2_amd64.deb ...
Unpacking libmono-btls-interface4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-i18n4.0-cil.
Preparing to unpack .../13-libmono-i18n4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-i18n4.0-cil (6.8.0.105+dfsg-2) ...
Selecting previously unselected package libmono-i18n-west4.0-cil.
Preparing to unpack .../14-libmono-i18n-west4.0-cil_6.8.0.105+dfsg-2_all.deb ...
Unpacking libmono-i18n-west4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-btls-interface4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libglade2-0:amd64 (1:2.6.4-2ubuntu2) ...
Setting up ca-certificates-mono (6.8.0.105+dfsg-2) ...
Setting up libmono-i18n4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libgdiplus (6.0.4+dfsg-2) ...
Setting up libmono-posix4.0-cil (6.8.0.105+dfsg-2) ...
Setting up cli-common (0.10) ...
Setting up libmono-i18n-west4.0-cil (6.8.0.105+dfsg-2) ...
Setting up binfmt-support (2.2.0-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service.
Setting up libmono-system-drawing4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libmono-cairo4.0-cil (6.8.0.105+dfsg-2) ...
Setting up libglib2.0-cil (2.12.40-3) ...
* Installing 1 assembly from libglib2.0-cil into Mono
Setting up libgtk2.0-cil (2.12.40-3) ...
* Installing 5 assemblies from libgtk2.0-cil into Mono
Processing triggers for sgml-base (1.29.1) ...
Setting up libglade2.0-cil (2.12.40-3) ...
* Installing 1 assembly from libglade2.0-cil into Mono
Processing triggers for desktop-file-utils (0.24+linuxmint1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for systemd (245.4-4ubuntu3.6) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ca-certificates (20210119~20.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

done.
Updating Mono key store
Mono Certificate Store Sync - version 6.8.0.105
Populate Mono certificate store from a concatenated list of certificates.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.

Importing into legacy system store:
I already trust 0, your new list has 129
Certificate added: CN=ACCVRAIZ1, OU=PKIACCV, O=ACCV, C=ES
Certificate added: C=ES, O=FNMT-RCM, OU=AC RAIZ FNMT-RCM
Certificate added: C=IT, L=Milan, O=Actalis S.p.A./03358520967, CN=Actalis Authentication Root CA
Certificate added: C=US, O=AffirmTrust, CN=AffirmTrust Commercial
  .... many lines / SE indicated body of the question is too long
    Certificate added: C=IN, OU=emSign PKI, O=eMudhra Technologies Limited, CN=emSign Root CA - G1
    129 new root certificates were added to your trust store.
    Import process completed.
    Done
    done.
    Setting up bless (0.6.0-7) ...

答案1

dpkg -i尝试按照命令行上指定的顺序处理每个包文件。您使用了全局扩展 ( *),这通常意味着按字母顺序排列。但正如您从这些消息中看到的,包依赖关系意味着它们必须按特定顺序安装:

ca-certificates-mono pre-depends on mono-runtime-common (>= 5.20)
  mono-runtime-common is not installed.

bless depends on libglib2.0-cil (>= 2.12.40); however:
 Package libglib2.0-cil is not configured yet.
bless depends on libgtk2.0-cil (>= 2.12.40); however:
 Package libgtk2.0-cil is not configured yet.

如果您想直接使用 来安装它们dpkg,则必须检查依赖关系并为自己制定合适的顺序。 apt为您处理这一切。

答案2

我不太熟悉aptor dpkg。但是,如果它们的方式rpm和操作类似yum,那么您的问题是您缺少依赖项。从您的“失败”输出:

`dpkg:关于.../ca-certificates-mono_6.8.0.105+dfsg-2_all.deb 包含 ca-certificates-mono,预依赖问题:ca-certificates-mono 预依赖在 mono-runtime-common (>= 5.20) 上,未安装 mono-runtime-common。

dpkg:处理存档/home/mint/Downloads/ca-certificates-mono_6.8.0.105+dfsg-2_all.deb(--install)时出错:预依赖问题 - 不安装 ca-certificates-mono`

并从你成功的输出:
The following additional packages will be installed:

看起来dpkg, likerpm只尝试安装选定的包,如果缺少依赖项就会失败。而apt, likeyum将尝试安装缺少的依赖项。

答案3

@JigglyNaga 的回答解释了这个问题。如果您想继续dpkg -i,除了手动检查依赖项之外,还可以dpkg -i files在错误修复错误后再次使用apt-get -f installthendpkg -i files来完成安装(至少这会成功解决问题中的特定问题)。

相关内容