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

    • OMV 3.x
    • Update

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 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 ().

    • Hello,


      have the same problem and do not get it solved


      Source Code

      1. root@happyfamilyserver:~# sudo apt-get upgrade
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. Calculating upgrade... Done
      6. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      7. 1 not fully installed or removed.
      8. After this operation, 0 B of additional disk space will be used.
      9. Do you want to continue? [Y/n] y
      10. Setting up openmediavault (4.1.8.2-1) ...
      11. Updating configuration database ...
      12. Traceback (most recent call last):
      13. File "/usr/sbin/omv-confdbadm", line 23, in <module>
      14. import openmediavault
      15. ImportError: No module named 'openmediavault'
      16. dpkg: error processing package openmediavault (--configure):
      17. subprocess installed post-installation script returned error exit status 1
      18. Errors were encountered while processing:
      19. openmediavault
      20. Traceback (most recent call last):
      21. File "/usr/sbin/omv-mkaptidx", line 35, in <module>
      22. import apt
      23. ImportError: No module named 'apt'
      24. E: Sub-process /usr/bin/dpkg returned an error code (1)
      25. root@happyfamilyserver:~#
      Display All
      is there already a solution?

      Steffen
    • Hello,


      have the same problem and do not get it solved


      Source Code

      1. root@happyfamilyserver:~# sudo apt-get upgrade
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. Calculating upgrade... Done
      6. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      7. 1 not fully installed or removed.
      8. After this operation, 0 B of additional disk space will be used.
      9. Do you want to continue? [Y/n] y
      10. Setting up openmediavault (4.1.8.2-1) ...
      11. Updating configuration database ...
      12. Traceback (most recent call last):
      13. File "/usr/sbin/omv-confdbadm", line 23, in <module>
      14. import openmediavault
      15. ImportError: No module named 'openmediavault'
      16. dpkg: error processing package openmediavault (--configure):
      17. subprocess installed post-installation script returned error exit status 1
      18. Errors were encountered while processing:
      19. openmediavault
      20. Traceback (most recent call last):
      21. File "/usr/sbin/omv-mkaptidx", line 35, in <module>
      22. import apt
      23. ImportError: No module named 'apt'
      24. E: Sub-process /usr/bin/dpkg returned an error code (1)
      25. root@happyfamilyserver:~#
      Display All
      is there already a solution?

      Steffen
    • The system seems to be broken and required Debian packages are not installed. Make sure python3-apt is installed.
      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
    • Did I try but seems to be a mistake, which possibilities would I still have ???

      Source Code

      1. root@happyfamilyserver:~# sudo apt-get install --reinstall python3-apt
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
      6. 1 not fully installed or removed.
      7. Need to get 0 B/158 kB of archives.
      8. After this operation, 0 B of additional disk space will be used.
      9. (Reading database ... 93358 files and directories currently installed.)
      10. Preparing to unpack .../python3-apt_1.4.0~beta3_armhf.deb ...
      11. Unpacking python3-apt (1.4.0~beta3) over (1.4.0~beta3) ...
      12. Setting up python3-apt (1.4.0~beta3) ...
      13. Setting up openmediavault (4.1.8.2-1) ...
      14. Updating configuration database ...
      15. Traceback (most recent call last):
      16. File "/usr/sbin/omv-confdbadm", line 23, in <module>
      17. import openmediavault
      18. ImportError: No module named 'openmediavault'
      19. dpkg: error processing package openmediavault (--configure):
      20. subprocess installed post-installation script returned error exit status 1
      21. Errors were encountered while processing:
      22. openmediavault
      23. Traceback (most recent call last):
      24. File "/usr/sbin/omv-mkaptidx", line 35, in <module>
      25. import apt
      26. ImportError: No module named 'apt'
      27. E: Sub-process /usr/bin/dpkg returned an error code (1)
      28. root@happyfamilyserver:~#
      Display All
    • Hello,

      Is there any repair cmd to solve the problem?




      I just do not know how to go on...

      Source Code

      1. Setting up openmediavault (4.1.8.2-1) ...
      2. Updating configuration database ...
      3. Traceback (most recent call last):
      4. File "/usr/sbin/omv-confdbadm", line 23, in <module>
      5. import openmediavault
      6. ImportError: No module named 'openmediavault'
    • python3-apt

      did dpkg-reconfigure --force python3-apt and no error occured.

      dpkg-reconfigure --force openmediavault
      Updating configuration database ...
      Traceback (most recent call last):
      File "/usr/sbin/omv-confdbadm", line 23, in <module>
      import openmediavault
      ImportError: No module named 'openmediavault'


      So how do I reinvoke the python modules again ?

      thx for your suggestion
    • Users Online 1

      1 Guest