[RESOVLED] E: Sub-process /usr/bin/dpkg error code (1)

    • [RESOVLED] E: Sub-process /usr/bin/dpkg error code (1)

      Newb to Linux here and getting very frustrated. I had OMV all set up and running SAB, Sickbeard and Couch Potato with a Greyhole pool and tried to set up Headphones, as it looked useful. After it upgraded to the latest version the Apply bar is yellow and clicking on Apply just generates an error. I also can't get the Sickbeard web interface to load either, don't know uf that is just coincidence or is linked.

      I have run the command to remove headphones and get the following output

      Source Code

      1. root@OMV:~# apt-get purge openmediavault-headphones
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. The following packages will be REMOVED:
      6. openmediavault-headphones*
      7. 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
      8. After this operation, 123 kB disk space will be freed.
      9. Do you want to continue [Y/n]? y
      10. (Reading database ... 117613 files and directories currently installed.)
      11. Removing openmediavault-headphones ...
      12. Stopping headphones
      13. No process in pidfile '/var/run/headphones.pid' found running; none killed.
      14. invoke-rc.d: initscript headphones, action "stop" failed.
      15. dpkg: error processing openmediavault-headphones (--purge):
      16. subprocess installed pre-removal script returned error exit status 1
      17. configured to not write apport reports
      18. Processing triggers for openmediavault ...
      19. Restarting engine daemon ...
      20. Updating file permissions ...
      21. Updating locale files ...
      22. Errors were encountered while processing:
      23. openmediavault-headphones
      24. E: Sub-process /usr/bin/dpkg returned an error code (1)
      Display All

      Ran re-install

      Source Code

      1. root@OMV:~# apt-get install openmediavault-headphones
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. openmediavault-headphones is already the newest version.
      6. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


      So it seems the uninstall is not working

      In webgui I have the yellow apply bar which won’t go away. When I click Apply I get error


      Failed to execute command 'export LANG=C; invoke-rc.d 'headphones' stop 2>&1': Stopping headphones No process in pidfile '/var/run/headphones.pid' found running; none killed. invoke-rc.d: initscript headphones, action "stop" failed.

      Details shown below

      Source Code

      1. Error #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'export LANG=C; invoke-rc.d 'headphones' stop 2>&1': Stopping headphones
      3. No process in pidfile '/var/run/headphones.pid' found running; none killed.
      4. invoke-rc.d: initscript headphones, action "stop" failed.' in /usr/share/php/openmediavault/initscript.inc:169
      5. Stack trace:
      6. #0 /usr/share/php/openmediavault/initscript.inc(148): OMVSysVInitScript->invoke('stop')
      7. #1 /usr/share/php/openmediavault/initscript.inc(53): OMVSysVInitScript->stop()
      8. #2 /usr/share/openmediavault/engined/module/headphones.inc(84): OMVSysVInitScript->exec()
      9. #3 /usr/share/openmediavault/engined/rpc/config.inc(162): OMVModuleHeadphones->stopService()
      10. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      11. #5 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      12. #6 /usr/share/openmediavault/engined/rpc/config.inc(253): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      13. #7 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      14. #8 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      15. #9 /usr/share/php/openmediavault/rpc.inc(62): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      16. #10 /usr/sbin/omv-engined(495): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      17. #11 {main}
      Display All


      There are now 2 entries for Headphones in Services on the web gui 

      I hope someone can help as this is driving me crazy.
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      Try:

      Source Code

      1. apt-get remove --purge openmediavault-headphones
      2. apt-get install openmediavault-headphones


      Greetings
      David
      "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"

      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


      Upload Logfile via WebGUI/CLI
      #openmediavault on freenode IRC | German & English | GMT+1
      Absolutely no Support via PM!

      I host parts of the omv-extras.org Repository, the OpenMediaVault Live Demo and the pre-built PXE Images. If you want you can take part and help covering the costs by having a look at my profile page.
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      Tried that and still got an error:

      Source Code

      1. root@OMV:~# apt-get remove --purge openmediavault-headphones
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. The following packages will be REMOVED:
      6. openmediavault-headphones*
      7. 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
      8. After this operation, 123 kB disk space will be freed.
      9. Do you want to continue [Y/n]? y
      10. (Reading database ... 117613 files and directories currently installed.)
      11. Removing openmediavault-headphones ...
      12. Stopping headphones
      13. No process in pidfile '/var/run/headphones.pid' found running; none killed.
      14. invoke-rc.d: initscript headphones, action "stop" failed.
      15. dpkg: error processing openmediavault-headphones (--purge):
      16. subprocess installed pre-removal script returned error exit status 1
      17. configured to not write apport reports
      18. Processing triggers for openmediavault ...
      19. Restarting engine daemon ...
      20. Updating file permissions ...
      21. Updating locale files ...
      22. Errors were encountered while processing:
      23. openmediavault-headphones
      24. E: Sub-process /usr/bin/dpkg returned an error code (1)
      Display All



      Source Code

      1. root@OMV:~# apt-get install openmediavault-headphones
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. openmediavault-headphones is already the newest version.
      6. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      7. root@OMV:~#
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      Whats the output of:

      Source Code

      1. apt-get install -f
      2. dpkg --configure -a


      Greetings
      David

      PS: Please post the output into codeboxes.
      "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"

      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


      Upload Logfile via WebGUI/CLI
      #openmediavault on freenode IRC | German & English | GMT+1
      Absolutely no Support via PM!

      I host parts of the omv-extras.org Repository, the OpenMediaVault Live Demo and the pre-built PXE Images. If you want you can take part and help covering the costs by having a look at my profile page.
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      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 0 not upgraded.
      5. root@OMV:~#


      The second command seems to do nothing

      Source Code

      1. root@OMV:~# dpkg --configure -a
      2. root@OMV:~#


      Didn't know how to do code boxes, switched from quick reply and there it is lol. Thanks for the help
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      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 0 not upgraded.
      5. root@OMV:~#


      The second command seems to do nothing

      Source Code

      1. root@OMV:~# dpkg --configure -a
      2. root@OMV:~#


      Didn't know how to do code boxes, switched from quick reply and there it is lol. Thanks for the help
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      OK trying again

      Source Code

      1. root@OMV:~# apt-get --purge remove openmediavault-headphones
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. The following packages will be REMOVED:
      6. openmediavault-headphones*
      7. 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
      8. After this operation, 123 kB disk space will be freed.
      9. Do you want to continue [Y/n]? y
      10. (Reading database ... 116419 files and directories currently installed.)
      11. Removing openmediavault-headphones ...
      12. Stopping headphones
      13. No process in pidfile '/var/run/headphones.pid' found running; none killed.
      14. invoke-rc.d: initscript headphones, action "stop" failed.
      15. dpkg: error processing openmediavault-headphones (--purge):
      16. subprocess installed pre-removal script returned error exit status 1
      17. configured to not write apport reports
      18. Processing triggers for openmediavault ...
      19. Restarting engine daemon ...
      20. Updating file permissions ...
      21. Updating locale files ...
      22. Errors were encountered while processing:
      23. openmediavault-headphones
      24. E: Sub-process /usr/bin/dpkg returned an error code (1)
      Display All


      Source Code

      1. root@OMV:~# apt-get clean
      2. root@OMV:~#


      Source Code

      1. root@OMV:~# apt-get install openmediavault-headphones
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. openmediavault-headphones is already the newest version.
      6. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      7. root@OMV:~#
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      Source Code

      1. root@OMV:~# dpkg -l | grep openmediavault
      2. ii openmediavault 0.5.49 Open netw ork attached storage solution
      3. ii openmediavault-autoshutdown 0.5.19 OpenMedia Vault AutoShutdown Plugin
      4. ii openmediavault-backup 0.5.2 backup pl ugin for OpenMediaVault.
      5. ii openmediavault-greyhole 0.6.2 OpenMedia Vault Greyhole (Storage pool server) plugin
      6. pi openmediavault-headphones 0.5.4 OpenMedia Vault Headphones plugin
      7. ii openmediavault-keyring 0.2 GnuPG arc hive keys of the OpenMediaVault archive
      8. ii openmediavault-links 0.5.9 OpenMedia Vault links plugin
      9. ii openmediavault-lvm2 0.5.6 OpenMedia Vault Logical Volume Manager (LVM2) plugin
      10. ii openmediavault-mysql 0.5.13 MySQL plu gin for OpenMediaVault.
      11. ii openmediavault-omvextrasorg 0.6.21 OMV-Extra s.org Package Repositories for OpenMediaVault
      12. ii openmediavault-owncloud 0.5.8 OpenMedia Vault ownCloud plugin
      13. ii openmediavault-plexmediaserver 0.5.5 OpenMedia Vault Plex Media Server plugin
      14. ii openmediavault-processlist 0.5.6 OpenMedia Vault process list panel
      15. ii openmediavault-sabnzbd 0.5.4 OpenMedia Vault SABnzbd plugin
      16. ii openmediavault-sickbeard 0.5.8 OpenMedia Vault Sick Beard plugin
      17. ii openmediavault-transmissionbt 0.5.18 OpenMedia Vault Transmission (BitTorrent client) plugin
      18. ii openmediavault-usbbackup 0.5.10 OpenMedia Vault USB/eSATA backup plugin
      19. root@OMV:~#
      Display All
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      Source Code

      1. root@OMV:~# dpkg -l | grep openmediavault
      2. ii openmediavault 0.5.49 Open network attached storage solution
      3. ii openmediavault-autoshutdown 0.5.19 OpenMediaVault AutoShutdown Plugin
      4. ii openmediavault-backup 0.5.2 backup plugin for OpenMediaVault.
      5. ii openmediavault-greyhole 0.6.2 OpenMediaVault Greyhole (Storage pool server) plugin
      6. pi openmediavault-headphones 0.5.4 OpenMediaVault Headphones plugin
      7. ii openmediavault-keyring 0.2 GnuPG archive keys of the OpenMediaVault archive
      8. ii openmediavault-links 0.5.9 OpenMediaVault links plugin
      9. ii openmediavault-lvm2 0.5.6 OpenMediaVault Logical Volume Manager (LVM2) plugin
      10. ii openmediavault-mysql 0.5.13 MySQL plugin for OpenMediaVault.
      11. ii openmediavault-omvextrasorg 0.6.21 OMV-Extras.org Package Repositories for OpenMediaVault
      12. ii openmediavault-owncloud 0.5.8 OpenMediaVault ownCloud plugin
      13. ii openmediavault-plexmediaserver 0.5.5 OpenMediaVault Plex Media Server plugin
      14. ii openmediavault-processlist 0.5.6 OpenMediaVault process list panel
      15. ii openmediavault-sabnzbd 0.5.4 OpenMediaVault SABnzbd plugin
      16. ii openmediavault-sickbeard 0.5.8 OpenMediaVault Sick Beard plugin
      17. ii openmediavault-transmissionbt 0.5.18 OpenMediaVault Transmission (BitTorrent client) plugin
      18. ii openmediavault-usbbackup 0.5.10 OpenMediaVault USB/eSATA backup plugin
      19. root@OMV:~#
      Display All
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      Source Code

      1. root@OMV:~# apt-get -f install
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      6. root@OMV:~# ^C
      7. root@OMV:~# apt-get upgrade
      8. Reading package lists... Done
      9. Building dependency tree
      10. Reading state information... Done
      11. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      12. root@OMV:~# ^C
      13. root@OMV:~# apt-get -f install
      14. Reading package lists... Done
      15. Building dependency tree
      16. Reading state information... Done
      17. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      18. root@OMV:~#
      Display All
    • Re: E: Sub-process /usr/bin/dpkg returned an error code (1)

      OK I did that and got the following output. Went into the webgui and clicked update in the yellow bar and it completed with no errors.
      I don't think I'll risk enabling or uninstalling Headphones again. Don't really need it but it's doing no harm sitting there. Maybe when I can get some kind of backup and restore working I'll have another go

      Thanks a lot for that you saved my sanity. Only problem I have now is no web interface for Sickbeard, it just says "This webpage not available". It was working fine before I enabled Headphones

      Thanks again for the help, you really know your stuff :)

      Source Code

      1. root@OMV:~# rm /var/lib/dpkg/info/openmediavault-head*
      2. root@OMV:~# cd /var/cache/apt/archive
      3. -bash: cd: /var/cache/apt/archive: No such file or directory
      4. root@OMV:~# rm openmediavault-head*
      5. rm: cannot remove `openmediavault-head*': No such file or directory
      6. root@OMV:~# apt-get --reinstall install openmediavault-headphones
      7. Reading package lists... Done
      8. Building dependency tree
      9. Reading state information... Done
      10. 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
      11. Need to get 9,426 B of archives.
      12. After this operation, 0 B of additional disk space will be used.
      13. WARNING: The following packages cannot be authenticated!
      14. openmediavault-headphones
      15. Install these packages without verification [y/N]? y
      16. Get:1 http://dh2k.omv-extras.org/debian/ sardaukar-miller-testing/main openmediavault-headphones all 0.5.4 [9,426 B]
      17. Fetched 9,426 B in 0s (53.5 kB/s)
      18. Selecting previously deselected package openmediavault-headphones.
      19. (Reading database ...
      20. dpkg: warning: files list file for package `openmediavault-headphones' missing, assuming package has no files currently installed.
      21. (Reading database ... 116407 files and directories currently installed.)
      22. Preparing to replace openmediavault-headphones 0.5.4 (using .../openmediavault-headphones_0.5.4_all.deb) ...
      23. Unpacking replacement openmediavault-headphones ...
      24. Processing triggers for openmediavault ...
      25. Restarting engine daemon ...
      26. Updating file permissions ...
      27. Updating locale files ...
      28. Setting up openmediavault-headphones (0.5.4) ...
      29. Configuration file `/etc/init.d/headphones'
      30. ==> File on system created by you or by a script.
      31. ==> File also in package provided by package maintainer.
      32. What would you like to do about it ? Your options are:
      33. Y or I : install the package maintainer's version
      34. N or O : keep your currently-installed version
      35. D : show the differences between the versions
      36. Z : start a shell to examine the situation
      37. The default action is to keep your current version.
      38. *** headphones (Y/I/N/O/D/Z) [default=N] ? y
      39. Installing new version of config file /etc/init.d/headphones ...
      40. headphones user already exists.
      41. Processing triggers for openmediavault ...
      42. Restarting engine daemon ...
      43. Updating file permissions ...
      44. Updating locale files ...
      45. root@OMV:~# ^C
      46. root@OMV:~#
      Display All