User avatar
Wizardling
Posts: 37
Joined: Wed Nov 16, 2016 4:22 pm
Location: New Zealand
Contact: ICQ Yahoo Messenger AOL

Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Tue Mar 13, 2018 10:57 pm

Any idea how to resolve this? TIA :-)

[email protected]:~ $ sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove && sudo reboot now
Hit:1 http://archive.raspberrypi.org/debian jessie InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Segmentation fault
Setting up util-linux (2.29.2-1+deb9u1) ...
Segmentation fault
dpkg: error processing package util-linux (--configure):
subprocess installed post-installation script returned error exit status 139
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
[email protected]:~ $
Frog blast the vent core!

ngineerken
Posts: 4
Joined: Thu Mar 15, 2018 3:02 am

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Thu Mar 15, 2018 3:09 am

I have the same issue:
Setting up util-linux (2.29.2-1+deb9u1) ...
update-rc.d: error: initscript does not exist: /etc/init.d/hwclock.sh
dpkg: error processing package util-linux (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)

rosswiebe
Posts: 4
Joined: Fri Feb 23, 2018 3:11 pm

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Thu Mar 15, 2018 9:33 pm

Try this. I have had (more or less) the same problem and this worked for me. (It was with a different package but I don't know why it shouldn't work)

Code: Select all

sudo apt remove util-linux
And

Code: Select all

sudo apt-get install util-linux

User avatar
Wizardling
Posts: 37
Joined: Wed Nov 16, 2016 4:22 pm
Location: New Zealand
Contact: ICQ Yahoo Messenger AOL

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Thu Mar 15, 2018 11:15 pm

Well, I'm afraid that broke my Raspbian Light install. I couldn't reinstall nor fix broken installs. Nor reboot. And couldn't connect after a hard restart. Don't worry, though. I'll start afresh.
Frog blast the vent core!

ngineerken
Posts: 4
Joined: Thu Mar 15, 2018 3:02 am

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Fri Mar 16, 2018 10:59 pm

Neither command worked.

sudo apt remove util-linux
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
e2fsprogs : PreDepends: util-linux (>= 2.15~rc1-1) but it is not going to be installed
i2c-tools : Depends: udev but it is not going to be installed
initramfs-tools-core : Depends: udev but it is not going to be installed
mountall : Depends: udev but it is not going to be installed
Depends: plymouth but it is not going to be installed
openjdk-8-jre-headless : Depends: util-linux (>= 2.26.2-4) but it is not going to be installed
plymouth-themes : Depends: plymouth (= 0.9.2-4+rpi1) but it is not going to be installed
systemd : Depends: util-linux (>= 2.27.1) but it is not going to be installed
sysvinit-utils : Depends: util-linux (> 2.28-2~) but it is not going to be installed
udisks2 : Depends: udev but it is not going to be installed
Recommends: eject but it is not going to be installed
Recommends: exfat-utils but it is not going to be installed
Recommends: gdisk but it is not going to be installed
Recommends: ntfs-3g but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)

rosswiebe
Posts: 4
Joined: Fri Feb 23, 2018 3:11 pm

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Mon Mar 19, 2018 3:43 pm

Ngineerken, you might be interested to know that posting a different subject on someone elses thread is called thread hijacking and is not supported on these forums. You should have posted your own thread. Otherwise i recommed following the kernels advice.

User avatar
Wizardling
Posts: 37
Joined: Wed Nov 16, 2016 4:22 pm
Location: New Zealand
Contact: ICQ Yahoo Messenger AOL

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Mon Mar 19, 2018 4:06 pm

rosswiebe wrote:
Mon Mar 19, 2018 3:43 pm
Ngineerken, you might be interested to know that posting a different subject on someone elses thread is called thread hijacking and is not supported on these forums. You should have posted your own thread. Otherwise i recommed following the kernels advice.
Seems like it's the same issue to me...?
Frog blast the vent core!

rosswiebe
Posts: 4
Joined: Fri Feb 23, 2018 3:11 pm

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Mon Mar 19, 2018 4:14 pm

Wizardling wrote:
rosswiebe wrote:
Mon Mar 19, 2018 3:43 pm
Ngineerken, you might be interested to know that posting a different subject on someone elses thread is called thread hijacking and is not supported on these forums. You should have posted your own thread. Otherwise i recommed following the kernels advice.
Seems like it's the same issue to me...?
Do these look the same????
Wizardling wrote: Any idea how to resolve this? TIA :-)

[email protected]:~ $ sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove && sudo reboot now
Hit:1 http://archive.raspberrypi.org/debian jessie InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Segmentation fault
Setting up util-linux (2.29.2-1+deb9u1) ...
Segmentation fault
dpkg: error processing package util-linux (--configure):
subprocess installed post-installation script returned error exit status 139
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
[email protected]:~ $
ngineerken wrote: I have the same issue:
Setting up util-linux (2.29.2-1+deb9u1) ...
update-rc.d: error: initscript does not exist: /etc/init.d/hwclock.sh
dpkg: error processing package util-linux (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
They look different to me.

ngineerken
Posts: 4
Joined: Thu Mar 15, 2018 3:02 am

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Tue Mar 20, 2018 3:15 am

I have been posting directly from the Raspberry PI and it did not seem to work, then I posted from my Mac.

In all we are all getting to the same error:

E: Sub-process /usr/bin/dpkg returned an error code (1)

The package is busted and it will not remove or install with out erroring out.
I have even tried from the GUI Add/Remove and the Synaptic package manager and they too error out

User avatar
rpdom
Posts: 12936
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Tue Mar 20, 2018 5:53 am

ngineerken wrote:
Tue Mar 20, 2018 3:15 am
I have been posting directly from the Raspberry PI and it did not seem to work, then I posted from my Mac.

In all we are all getting to the same error:
For different reasons. Therefore it is a different problem.

The OP's error related to what looks like a corrupt program:

Code: Select all

Segmentation fault
while yours was related to a missing file:

Code: Select all

update-rc.d: error: initscript does not exist: /etc/init.d/hwclock.sh

ngineerken
Posts: 4
Joined: Thu Mar 15, 2018 3:02 am

Re: Update error: "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Tue Mar 20, 2018 10:55 pm

I fixed the problem of the missing " initscript does not exist: /etc/init.d/hwclock.sh" from a running Pi
it is now updating

Return to “Troubleshooting”