对于本地Debian安装的未完成升级,我有一个问题:
Operating System: Debian GNU/Linux buster/sid
Kernel: Linux 4.12.0-1-686-pae
Architecture: x86我试图用apt upgrade -f和dpkg --configure lilypond-data修复它,但是无论我做什么,我都会得到以下信息:
Setting up lilypond-data (2.18.2-8) ...
Running mktexlsr /usr/share/texlive/texmf-dist...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST...
mktexlsr: Done.
ln: failed to create symbolic link 'lilypond/user': File exists
dpkg: error processing package lilypond-data (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
lilypond-data
E: Sub-process /usr/bin/dpkg returned an error code (1)如果我运行dpkg --remove --force-remove-reinstreq --dry-run lilypond-data,就会得到:
dpkg: dependency problems prevent removal of lilypond-data:
lilypond depends on lilypond-data (= 2.18.2-8).
dpkg: error processing package lilypond-data (--remove):
dependency problems - not removing
Errors were encountered while processing:
lilypond-data发布于 2017-08-23 16:09:59
一般的方法是查看(shell脚本) /var/lib/dpkg/info/lilypond-data.postinst并找到失败的ln行。然后确定原因,并绕过它(例如,通过对现有链接进行rm,或者通过编辑postinst来处理最坏的情况)。当然,然后再提交一个窃听器。
除了其他人已经这么做了-参见bug 871631。bug已经修复;您只需要从不稳定的地方抓取(并安装) 2.18.2-9。
(这就得出了一个重要的教训:在考虑如何修复bug跟踪系统之前检查它.)
另外:您可能需要安装apt-列表错误。
发布于 2017-08-23 16:13:41
本部分说明了什么是重要的:
ln: failed to create symbolic link 'lilypond/user': File exists
dpkg: error processing package lilypond-data (--configure):
subprocess installed post-installation script returned error exit status 1安装后脚本失败。这很可能是因为它没有被配置为正确地处理它以前的版本。
debian包有两个组件:
.tar.gz (或任何类似的),解压缩到根目录。因此,包安装似乎是这样的:
删除的发生类似,但前删除和后删除脚本。
在您的示例中,进行了包升级,然后脚本调用顺序稍微复杂一点,但不太复杂。
从他们那里,新包的后安装脚本由于某种原因无法运行。因此,它已经在您的系统中提取了。
因为它是一个开发版,手动修复这个问题并不是很难。
编辑旧的安装后脚本。
vi /var/lib/dpkg/info/lilypond-data.postinst找到它无法创建链接的地方,让他允许它。
在那之后,跑:
dpkg --configure -a做你想做的事。(如果没有成功,不要担心,重新编辑并重试。)
https://unix.stackexchange.com/questions/387906
复制相似问题