apt-get update - error omv-mkaptidx importerror: no modules named 'apt'

    • OMV 3.x (stable)
    • Update
    • apt-get update - error omv-mkaptidx importerror: no modules named 'apt'

      Hello there,

      I'm receiving an error after apt-get update.
      Here is the output:


      Source Code

      1. Traceback (most recent call last):
      2. File "/usr/sbin/omv-mkaptidx", line 35, in <module>
      3. import apt
      4. ImportError: No module named 'apt'
      5. Reading package lists... Done
      Any idea how to solve this issue?

      Thank you in advance.
    • Please reinstall the following package:

      Shell-Script

      1. # apt-get install --reinstall python3-apt
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • I got the same error after apt-get update & apt-get dist-upgrade

      Traceback (most recent call last):
      File "/usr/sbin/omv-confdbadm", line 23, in <module>
      import openmediavault
      ModuleNotFoundError: No module named 'openmediavault'
      dpkg: error al procesar el paquete openmediavault (--configure):
      el subproceso instalado el script post-installation devolvió el código de salida de error 1

      Se encontraron errores al procesar:
      openmediavault
      Traceback (most recent call last):
      File "/usr/sbin/omv-mkaptidx", line 35, in <module>
      import apt
      ModuleNotFoundError: No module named 'apt'
      E: Sub-process /usr/bin/dpkg returned an error code (1)

      I'dont know how to fix it, could someone help me please??
    • Maiki wrote:

      I got the same error after apt-get update & apt-get dist-upgrade

      Traceback (most recent call last):
      File "/usr/sbin/omv-confdbadm", line 23, in <module>
      import openmediavault
      ModuleNotFoundError: No module named 'openmediavault'
      dpkg: error al procesar el paquete openmediavault (--configure):
      el subproceso instalado el script post-installation devolvió el código de salida de error 1

      Se encontraron errores al procesar:
      openmediavault
      Traceback (most recent call last):
      File "/usr/sbin/omv-mkaptidx", line 35, in <module>
      import apt
      ModuleNotFoundError: No module named 'apt'
      E: Sub-process /usr/bin/dpkg returned an error code (1)

      I'dont know how to fix it, could someone help me please??
      First we need to know your platform, how you installed OMV and so on. I really do not understand that behaviour because all packages are installed via package dependencies. The only reason for this might be that the python3-apt package is broken for your platform.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Thank you for your help. I'm newbie so tell me please what do you need.

      My kernel version:

      Shell-Script

      1. root@micromaiqui:~# cat /proc/version
      2. Linux version 4.9.0-0.bpo.4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Debian 4.9.65-3+deb9u1~bpo8+1 (2017-12-23)

      I'm running OMV in a HP microserver gen7, OMV 3.0.96 (Erasmus). Fresh Installed from ISO.

      I did:

      Shell-Script

      1. # apt-get install --reinstall python3-apt
      but it doesn't fix nothing
    • hi,

      i had the same error after apt-get update (on OMV 2.2.14):

      Source Code

      1. Traceback (most recent call last):
      2. File "/usr/sbin/omv-mkaptidx", line 35, in <module>
      3. import apt
      4. ImportError: No module named 'apt'
      5. Reading package lists... Done

      i solved the problem after edit the file "/etc/apt/apt.conf.d/99openmediavault-mkaptidx" and changed the line

      APT::Update::Post-Invoke-Success { "which omv-mkaptidx >/dev/null 2>&1 || exit 0; omv-mkaptidx || true"; };"

      to

      APT-GET::Update::Post-Invoke-Success { "which omv-mkaptidx >/dev/null 2>&1 || exit 0; omv-mkaptidx || true"; };


      edit:
      it solved only the problem for apt-get update, but not for reinstall, upgrade, etc

      The post was edited 1 time, last by Franzl ().

    • Users Online 1

      1 Guest