ucsf-chimerax-daily 的安装后脚本返回 Python 错误

ucsf-chimerax-daily 的安装后脚本返回 Python 错误

这个问题是在我安装了一个准备不充分的 ucsf-chimerax 安装文件后出现的,导致了以下错误:

Install desktop menu and associated mime types
Traceback (most recent call last):  
  File "/usr/lib/ucsf-chimerax-daily/lib/python3.6/runpy.py", line 193, in
_run_module_as_main  
    "__main__", mod_spec)  
  File "/usr/lib/ucsf-chimerax-daily/lib/python3.6/runpy.py", line 85, in
_run_code  
    exec(code, run_globals)  
  File "/usr/lib/ucsf-chimerax-daily/lib/python3.6/site-
packages/ChimeraX_main.py", line 802, in <module>  
    exit_code = init(sys.argv)  
  File "/usr/lib/ucsf-chimerax-daily/lib/python3.6/site-
packages/ChimeraX_main.py", line 601, in init  
    run(sess, cmd)  
  File "/usr/lib/ucsf-chimerax-daily/lib/python3.6/site-
packages/chimerax/core/commands/run.py", line 31, in run  
    results = command.run(text, log=log)  
  File "/usr/lib/ucsf-chimerax-daily/lib/python3.6/site-
packages/chimerax/core/commands/cli.py", line 2561, in run  
    result = ci.function(session, **kw_args)  
  File "/usr/lib/ucsf-chimerax-daily/lib/python3.6/site-
packages/chimerax/core/commands/linux.py", line 19, in install  
    install(session, system=system)  
  File "/usr/lib/ucsf-chimerax-daily/lib/python3.6/site-
packages/chimerax/core/_xdg.py", line 421, in install  
    info = get_info(session, system)  
  File "/usr/lib/ucsf-chimerax-daily/lib/python3.6/site-
packages/chimerax/core/_xdg.py", line 474, in get_info  
    dists = pip.get_installed_distributions(local_only=True)  
AttributeError: module 'pip' has no attribute 'get_installed_distributions'  
dpkg: error processing package ucsf-chimerax-daily (--configure):
installed ucsf-chimerax-daily package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
ucsf-chimerax-daily

该程序运行良好,我在菜单中没有遇到任何问题。只有消息令人厌烦。每次我安装新软件或升级软件包时,错误都会再次出现。

答案1

这是 UCSF ChimeraX 发行版中的一个错误。请将 UCSF ChimeraX 的错误报告给[电子邮件保护]以便为所有用户修复这些问题。幸运的是,我们发现了这个问题,因此已经修复。请尝试下一个每日发布版本(2018-10-17)。

答案2

我编辑了该文件/var/lib/dpkg/info/ucsf-chimerax-daily.postinst,注释掉了执行其他操作然后回显消息的命令。

然后我就跑了

sudo apt upgrade

有些消息例如

W: APT had planned for dpkg to do more than it reported back (0 vs 4).
   Affected packages: ucsf-chimerax-daily:amd64

但问题解决了。我认为

sudo dpkg --configure ucsf-chimerax-daily:amd64

也能完成这项工作。

相关内容