Apt

Ubuntu LTS 版本升级

Ubuntu 16.04 升级到 18.04 过程中,出现了和 miktex 相关的一个错误。升级顺利完成,但是发生了这个错误。导致了一些包并没有更新,以及 apt 的依赖被搞崩了,提示如下

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies
miktex : Depends: libcurl3 (>= 7.16.2) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

这时候使用 apt remove miktex 也是没有用的,提示这个错误

Removing miktex (2.9.6650-1) ...
miktexsetup: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version
`CURL_OPENSSL_3' not found (required by miktexsetup)
dpkg: error processing package miktex (--remove):
installed miktex package pre-removal script subprocess returned error exit status 1
Errors were encountered while processing:
miktex
E: Sub-process /usr/bin/dpkg returned an error code (1)

错误的原因是 Ubuntu 18.04 将 libcurl3 升级成 libcurl4,对应的库也进行了更新,导致依赖 libcurl3 的应用程序例如 miktex 崩坏,进而导致 apt 崩坏,小白用户面对这种情况基本就手足无措了。

...