【问题标题】:dpkg-query: package 'python-meep' is not installeddpkg-query:未安装包“python-meep”
【发布时间】:2020-11-03 02:30:45
【问题描述】:

似乎我的 python3 实例(在 Kubuntu 虚拟机上)要求安装 meep 作为其他软件包安装过程的一部分。该安装失败,现在每次我尝试安装软件包时都会收到与 meep 相关的安装错误。例如,这只是今天发生的。

pel@pel-VirtualBox:~/work$ sudo apt install pipenv
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libllvm9
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  python3-appdirs python3-distlib python3-filelock python3-virtualenv
  python3-virtualenv-clone
The following NEW packages will be installed:
  pipenv python3-appdirs python3-distlib python3-filelock python3-virtualenv
  python3-virtualenv-clone
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 3,465 kB of archives.
After this operation, 13.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://us.archive.ubuntu.com/ubuntu focal/main amd64 python3-appdirs all 1.4.3-2.1 [10.8 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 python3-distlib all 0.3.0-1 [116 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 python3-filelock all 3.0.12-2 [7,948 B]
Get:4 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 python3-virtualenv all 20.0.17-1 [63.4 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 python3-virtualenv-clone all 0.3.0-2 [8,696 B]
Get:6 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 pipenv all 11.9.0-1 [3,258 kB]
Fetched 3,465 kB in 2s (1,760 kB/s) 
Selecting previously unselected package python3-appdirs.
(Reading database ... 287182 files and directories currently installed.)
Preparing to unpack .../0-python3-appdirs_1.4.3-2.1_all.deb ...
Unpacking python3-appdirs (1.4.3-2.1) ...
Selecting previously unselected package python3-distlib.
Preparing to unpack .../1-python3-distlib_0.3.0-1_all.deb ...
Unpacking python3-distlib (0.3.0-1) ...
Selecting previously unselected package python3-filelock.
Preparing to unpack .../2-python3-filelock_3.0.12-2_all.deb ...
Unpacking python3-filelock (3.0.12-2) ...
Selecting previously unselected package python3-virtualenv.
Preparing to unpack .../3-python3-virtualenv_20.0.17-1_all.deb ...
Unpacking python3-virtualenv (20.0.17-1) ...
Selecting previously unselected package python3-virtualenv-clone.
Preparing to unpack .../4-python3-virtualenv-clone_0.3.0-2_all.deb ...
Unpacking python3-virtualenv-clone (0.3.0-2) ...
Selecting previously unselected package pipenv.
Preparing to unpack .../5-pipenv_11.9.0-1_all.deb ...
Unpacking pipenv (11.9.0-1) ...
Setting up python3-filelock (3.0.12-2) ...
Setting up python3-virtualenv-clone (0.3.0-2) ...
Setting up python3-distlib (0.3.0-1) ...
Setting up python3-meep (1.12.0-2build2) ...
dpkg-query: package 'python-meep' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 289, in <module>
    main()
  File "/usr/bin/pycompile", line 262, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/pycompile", line 154, in compile
    for fn, versions_to_compile in filter_files(files, e_patterns, versions):
  File "/usr/bin/pycompile", line 109, in filter_files
    for fn in files:
  File "/usr/share/python/debpython/files.py", line 77, in filter_out_ext
    for fn in files:
  File "/usr/share/python/debpython/namespace.py", line 77, in add_namespace_files
    for fn in files:
  File "/usr/share/python/debpython/files.py", line 69, in filter_public
    for fn in files:
  File "/usr/share/python/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of python-meep
dpkg: error processing package python3-meep (--configure):
 installed python3-meep package post-installation script subprocess returned error exit status 1
Setting up python3-appdirs (1.4.3-2.1) ...
Setting up python3-virtualenv (20.0.17-1) ...
Setting up pipenv (11.9.0-1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
Errors were encountered while processing:
 python3-meep
E: Sub-process /usr/bin/dpkg returned an error code (1)

自动删除清除或删除没有任何效果。更新和升级没有奏效。我无计可施。除了撕掉python并重新安装所有东西之外,有没有人有任何建议?

【问题讨论】:

    标签: python-3.x ubuntu uninstallation python-module meep


    【解决方案1】:

    我的系统也遇到了同样的问题。我做了一些很可能不推荐的事情。除了冒险,我别无选择。如果您遵循以下程序,您也将承担风险。但是,唯一可以保证的是它对我有用。

    有罪的包是python3-meep。它可能在没有在内部更改包名称的情况下进行了升级。这是我确认问题的地方。搜索显示该问题已在 Debian 中报告并修复。进入 Ubuntu 可能需要一些时间

    $grep python-meep /var/lib/dpkg/info/python3-meep.*
    /var/lib/dpkg/info/python3-meep.postinst:  pycompile -p python-meep
    /var/lib/dpkg/info/python3-meep.prerm:  pyclean -p python-meep 
    /var/lib/dpkg/info/python3-meep.prerm:  dpkg -L python-meep | grep \.py$ | while read file
    

    所以在文件中

    • /var/lib/dpkg/info/python3-meep.postinst 我将python-meep 的出现替换为python3-meep
    • /var/lib/dpkg/info/python3-meep.prerm 我用python3-meep 替换了两次出现的python-meep

    然后我可以删除python3-meep

    $ sudo apt-get remove python3-meep
     Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be REMOVED:
      python3-meep
    0 upgraded, 0 newly installed, 1 to remove and 17 not upgraded.
    1 not fully installed or removed.
    After this operation, 3,225 kB disk space will be freed.
    Do you want to continue? [Y/n] 
    (Reading database ... 371161 files and directories currently installed.)
    Removing python3-meep (1.12.0-2build2) ...
    Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
    $
    

    如果有人指出更清洁的方法,我将不胜感激。

    【讨论】:

    • 感谢您传达此策略。听起来不错,但我自己无法测试。我早就删除了有问题的虚拟实例并将其替换为另一个,但这次没有对 python3 进行任何积极的更新/升级。只要我不将 GPU 和其他准支持的用例推向极限,我就会有稳定的体验。我希望。敲木头。如果我不这样做,那么我总是可以把它撕下来重新安装!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-22
    • 1970-01-01
    • 2014-05-25
    • 2023-02-13
    相关资源
    最近更新 更多