我想检查一下 compat 等于 9 的 deb 的依赖关系。如果依赖关系不正常,只会回显一些警告,但 deb 仍然可以安装(似乎 Depends:xxx 不适合这样做)。所以我尝试了两种方法:
添加安装程序/预安装脚本编译正常,但在安装 deb 时出现问题:
debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 1.) debconf: falling back to frontend: Readline (Reading database ... 77398 files and directories currently installed.) Preparing to unpack .../test_1.0.0-rc0.ubuntu16.04_amd64.deb ... dpkg (subprocess): unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst): No such file or directory.........................................................................................................................................] dpkg: error processing archive /mnt/package/tmp/test_1.0.0-rc0.ubuntu16.04_amd64.deb (--unpack): subprocess new pre-installation script returned error exit status 2 Errors were encountered while processing: /mnt/package/tmp/test_1.0.0-rc0.ubuntu16.04_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
在安装程序/规则文件中添加一些脚本,也不起作用
有人可以向我展示一些如何解决这个问题的示例吗?
答案1
因此,您希望在不阻止用户安装此软件包的情况下延迟安装依赖项。
实际上,您当前的设置中有很多示例。
例如,在已安装的包脚本中搜索一些像“answer”这样的关键字:,,,,preinst
。就像这样:postinst
prerm
postrm
grep -in answer /var/lib/dpkg/info/*.preinst