How to Reinstall update-alternatives?

    • OMV 3.x

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

    • darkarn wrote:

      how do I reinstall update-alternatives?
      update-alternatives is part of the dpkg package. So, that is very bad it is missing. What is the output of: apt-get -f install
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      darkarn wrote:

      how do I reinstall update-alternatives?
      update-alternatives is part of the dpkg package. So, that is very bad it is missing. What is the output of: apt-get -f install

      Source Code

      1. Reading package lists... Done
      2. Building dependency tree
      3. Reading state information... Done
      4. 0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
      5. 2 not fully installed or removed.
      6. After this operation, 0 B of additional disk space will be used.
      7. Setting up procps (2:3.3.9-9+deb8u1) ...
      8. /var/lib/dpkg/info/procps.postinst: 76: /var/lib/dpkg/info/procps.postinst: update-alternatives: not found
      9. dpkg: error processing package procps (--configure):
      10. subprocess installed post-installation script returned error exit status 127
      11. Setting up perl (5.20.2-3+deb8u11) ...
      12. /var/lib/dpkg/info/perl.postinst: 16: /var/lib/dpkg/info/perl.postinst: update-alternatives: not found
      13. dpkg: error processing package perl (--configure):
      14. subprocess installed post-installation script returned error exit status 127
      15. Errors were encountered while processing:
      16. procps
      17. perl
      18. E: Sub-process /usr/bin/dpkg returned an error code (1)
      Display All
      Looks bad, procps and perl are having errors. I am not even sure why this is happening but I got a bad feeling about this one
    • Assuming you are using an amd64 OMV 3.x system, try (as root):

      wget http://ftp.us.debian.org/debian/pool/main/d/dpkg/dpkg_1.17.27_amd64.deb
      dpkg -i dpkg_1.17.27_amd64.deb
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      Assuming you are using an amd64 OMV 3.x system, try (as root):

      wget http://ftp.us.debian.org/debian/pool/main/d/dpkg/dpkg_1.17.27_amd64.deb
      dpkg -i dpkg_1.17.27_amd64.deb

      Thanks! That allowed me to install and update plugins again (but I saw some "Bad Gateway" messages but was able to close the dialog)

      When I was uninstalling one of the plugins, I saw this though:

      Source Code

      1. Error #0:
      2. exception 'OMV\ExecException' with message 'Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; export DEBIAN_FRONTEND=noninteractive; apt-get --yes --auto-remove --purge remove openmediavault-teamviewerhost 2>&1' with exit code '100': Reading package lists...
      3. Building dependency tree...
      4. Reading state information...
      5. The following packages will be REMOVED:
      6. libgstreamer-plugins-base0.10-0* libgstreamer0.10-0* liborc-0.4-0*
      7. libqt5network5* libqt5printsupport5* libqt5qml5* libqt5quick5* libqt5sql5*
      8. libqt5webkit5* libqt5x11extras5* openmediavault-teamviewerhost*
      9. qml-module-qtquick-controls* qml-module-qtquick-dialogs*
      10. qml-module-qtquick-layouts* qml-module-qtquick-privatewidgets*
      11. qml-module-qtquick-window2* qml-module-qtquick2* teamviewer-host*
      12. 0 upgraded, 0 newly installed, 18 to remove and 0 not upgraded.
      13. 1 not fully installed or removed.
      14. After this operation, 121 MB disk space will be freed.
      15. (Reading database ...
      16. (Reading database ... 5%
      17. (Reading database ... 10%
      18. (Reading database ... 15%
      19. (Reading database ... 20%
      20. (Reading database ... 25%
      21. (Reading database ... 30%
      22. (Reading database ... 35%
      23. (Reading database ... 40%
      24. (Reading database ... 45%
      25. (Reading database ... 50%
      26. (Reading database ... 55%
      27. (Reading database ... 60%
      28. (Reading database ... 65%
      29. (Reading database ... 70%
      30. (Reading database ... 75%
      31. (Reading database ... 80%
      32. (Reading database ... 85%
      33. (Reading database ... 90%
      34. (Reading database ... 95%
      35. (Reading database ... 100%
      36. (Reading database ... 125670 files and directories currently installed.)
      37. Removing openmediavault-teamviewerhost (3.0.1) ...
      38. /var/lib/dpkg/info/openmediavault-teamviewerhost.postrm: 699: /var/lib/dpkg/info/openmediavault-teamviewerhost.postrm: tee: not found
      39. dpkg: error processing package openmediavault-teamviewerhost (--purge):
      40. subprocess installed post-removal script returned error exit status 127
      41. Removing teamviewer-host (12.1.83885) ...
      42. Removed symlink /etc/systemd/system/multi-user.target.wants/teamviewerd.service.
      43. Clearing assignments ...
      44. done
      45. Purging configuration files for teamviewer-host (12.1.83885) ...
      46. Removing libqt5webkit5:amd64 (5.3.2+dfsg-4) ...
      47. Purging configuration files for libqt5webkit5:amd64 (5.3.2+dfsg-4) ...
      48. Removing libgstreamer-plugins-base0.10-0:amd64 (0.10.36-2) ...
      49. Purging configuration files for libgstreamer-plugins-base0.10-0:amd64 (0.10.36-2) ...
      50. Removing libgstreamer0.10-0:amd64 (0.10.36-1.5) ...
      51. Purging configuration files for libgstreamer0.10-0:amd64 (0.10.36-1.5) ...
      52. Removing liborc-0.4-0:amd64 (1:0.4.22-1) ...
      53. Purging configuration files for liborc-0.4-0:amd64 (1:0.4.22-1) ...
      54. Removing qml-module-qtquick-dialogs:amd64 (5.3.2-2) ...
      55. Removing qml-module-qtquick-privatewidgets:amd64 (5.3.2-2) ...
      56. Removing qml-module-qtquick-controls:amd64 (5.3.2-2) ...
      57. Removing qml-module-qtquick-layouts:amd64 (5.3.2-2) ...
      58. Removing qml-module-qtquick2:amd64 (5.3.2-4) ...
      59. Removing qml-module-qtquick-window2:amd64 (5.3.2-4) ...
      60. Removing libqt5printsupport5:amd64 (5.3.2+dfsg-4+deb8u2) ...
      61. Purging configuration files for libqt5printsupport5:amd64 (5.3.2+dfsg-4+deb8u2) ...
      62. Removing libqt5sql5:amd64 (5.3.2+dfsg-4+deb8u2) ...
      63. Purging configuration files for libqt5sql5:amd64 (5.3.2+dfsg-4+deb8u2) ...
      64. Removing libqt5x11extras5:amd64 (5.3.2-2) ...
      65. Purging configuration files for libqt5x11extras5:amd64 (5.3.2-2) ...
      66. Removing libqt5quick5:amd64 (5.3.2-4) ...
      67. Purging configuration files for libqt5quick5:amd64 (5.3.2-4) ...
      68. Removing libqt5qml5:amd64 (5.3.2-4) ...
      69. Purging configuration files for libqt5qml5:amd64 (5.3.2-4) ...
      70. Removing libqt5network5:amd64 (5.3.2+dfsg-4+deb8u2) ...
      71. Purging configuration files for libqt5network5:amd64 (5.3.2+dfsg-4+deb8u2) ...
      72. Processing triggers for openmediavault (3.0.99) ...
      73. Restarting engine daemon ...
      74. Processing triggers for hicolor-icon-theme (0.13-1) ...
      75. Processing triggers for mime-support (3.58) ...
      76. Processing triggers for libc-bin (2.19-18+deb8u10) ...
      77. Errors were encountered while processing:
      78. openmediavault-teamviewerhost
      79. E: Sub-process /usr/bin/dpkg returned an error code (1)' in /usr/share/openmediavault/engined/rpc/pluginmgmt.inc:151
      80. Stack trace:
      81. #0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMVRpcServicePluginMgmt->{closure}('/tmp/bgstatusGl...', '/tmp/bgoutputr9...')
      82. #1 /usr/share/openmediavault/engined/rpc/pluginmgmt.inc(155): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      83. #2 [internal function]: OMVRpcServicePluginMgmt->remove(Array, Array)
      84. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      85. #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('remove', Array, Array)
      86. #5 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Plugin', 'remove', Array, Array, 1)
      87. #6 {main}
      Display All
    • darkarn wrote:

      I saw some "Bad Gateway" messages but was able to close the dialog
      Those are probably from nginx restarting. Shouldn't be a problem.

      darkarn wrote:

      tee: not found
      That isn't good. tee is provided by coreutils. What is the output of: dpkg -l | grep -v ^ii
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      darkarn wrote:

      I saw some "Bad Gateway" messages but was able to close the dialog
      Those are probably from nginx restarting. Shouldn't be a problem.

      darkarn wrote:

      tee: not found
      That isn't good. tee is provided by coreutils. What is the output of: dpkg -l | grep -v ^ii

      Source Code

      1. Desired=Unknown/Install/Remove/Purge/Hold
      2. | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
      3. |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      4. ||/ Name Version Architecture Description
      5. +++-==================================-=================================-============-========================================================================
      6. =============
      7. rc linux-image-4.9.0-0.bpo.3-amd64 4.9.30-2+deb9u5~bpo8+1 amd64 Linux 4.9 for 64-bit PCs
      8. iF openmediavault-omvextrasorg 3.4.31 all OMV-Extras.org Package Repositories for OpenMediaVault
      9. pH openmediavault-teamviewerhost 3.0.1 all Teamviewer Host plugin for OpenMediaVault.
      This is what I got

      Sorry for not mentioning this earlier, I just recalled what happened last night. I was updating some plugins when some of them started giving similar errors, so I decided to reboot and see if that clears any error.

      During boot, it stopped until I did a fsck -a (or something like that) and then it continued, leading to this thread.
    • I guess you need to fix tee the same way was update-alternatives.

      wget http://ftp.us.debian.org/debian/pool/main/c/coreutils/coreutils_8.23-4_amd64.deb
      dpkg -i coreutils_8.23-4_amd64.deb

      Then hopefully apt-get -f install can fix things.
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      I guess you need to fix tee the same way was update-alternatives.

      wget http://ftp.us.debian.org/debian/pool/main/c/coreutils/coreutils_8.23-4_amd64.deb
      dpkg -i coreutils_8.23-4_amd64.deb

      Then hopefully apt-get -f install can fix things.

      Thanks! That did the trick!

      After those commands, I decided to run this again

      Source Code

      1. dpkg -l | grep -v ^ii


      It showed me the same teamviewer plugin. I went into the Plugins and saw that its Installed light is off but I can press the Uninstall button for it. It uninstalled successfully and along the way I too successfully installed another plugin.


      Only think left was an old header, which wont matter much but why would it be there in the first place? Did the update procedure then forget to remove it properly?

      I am also curious about the fsck in the first place that led to this. Should I schedule a disk check?
    • darkarn wrote:

      which wont matter much but why would it be there in the first place?
      It is removed but not purged. So, it isn't hurting anything.

      darkarn wrote:

      Did the update procedure then forget to remove it properly?
      Hard to say but it happens from time to time.

      darkarn wrote:

      I am also curious about the fsck in the first place that led to this. Should I schedule a disk check?
      When you rebooted, a filesystem might not have unmounted properly leading to the need to fsck. Shouldn't hurt to schedule a check.
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      darkarn wrote:

      which wont matter much but why would it be there in the first place?
      It is removed but not purged. So, it isn't hurting anything.

      darkarn wrote:

      Did the update procedure then forget to remove it properly?
      Hard to say but it happens from time to time.

      darkarn wrote:

      I am also curious about the fsck in the first place that led to this. Should I schedule a disk check?
      When you rebooted, a filesystem might not have unmounted properly leading to the need to fsck. Shouldn't hurt to schedule a check.


      Thanks, so should I do a fsck and then an extended SMART test just to be sure?
    • darkarn wrote:

      Everything passed so far, which means there are no problem?
      That is a good sign.

      darkarn wrote:

      Still puzzled on why this occurred in the first place
      As mentioned before, if the filesystem didn't unmount properly (process not stopping) when you rebooted, it is possible.
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!