You are not logged in.

#1 2024-02-11 02:59

ChasHenry
Member
Registered: 2019-03-13
Posts: 44

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

Request assistance fixing error code (1)

sudo apt-get update && sudo apt-get dist-upgrade
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 https://dl.winehq.org/wine-builds/debian bookworm InRelease
Hit:4 http://security.debian.org bookworm-security InRelease
Hit:6 https://packages.mozilla.org/apt mozilla InRelease
Hit:5 https://q4os.org/q4repo q4os-5-0-cn InRelease
Get:7 https://q4os.org/qextrepo bookworm-plasmalooks-cn InRelease [3,237 B]
Hit:8 https://q4os.org/qextrepo bookworm-firefox-cn InRelease
Fetched 3,237 B in 3s (1,170 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-6.1.0-18-amd64 (6.1.76-1) ...
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-18-amd64.
Sign command: /usr/lib/linux-kbuild-6.1/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
applying patch cc_version_check-gcc5.patch...patching file conftest.sh

applying patch bashisms.patch...patching file conftest.sh

applying patch linux-2.6.34-dev_pm_info-runtime_auto.patch...patching file conftest.sh

applying patch 0033-refuse-to-load-legacy-module-if-IBT-is-enabled.patch...patching file nvidia-modeset/nvidia-modeset-linux.c
patching file nvidia/nv.c

applying patch ppc64el.patch...patching file nvidia/nvlink_common.h

applying patch fragile-ARCH.patch...patching file Makefile

applying patch use-kbuild-compiler.patch...patching file Makefile
patching file Kbuild

applying patch use-kbuild-flags.patch...patching file Kbuild
patching file nvidia/nvidia.Kbuild
patching file Makefile
patching file nvidia-modeset/nvidia-modeset.Kbuild

applying patch conftest-verbose.patch...patching file Kbuild

applying patch conftest-prefer-arch-headers.patch...patching file conftest.sh


Building module:
Cleaning build area...
env NV_VERBOSE=1 make -j4 modules KERNEL_UNAME=6.1.0-18-amd64...................(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-18-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-tesla-470/470.223.02/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.1.0-18-amd64 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.1.0-18-amd64 (--configure):
 installed linux-image-6.1.0-18-amd64 package post-installation script subprocess returned error exit status 1
Setting up linux-headers-6.1.0-18-amd64 (6.1.76-1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-18-amd64.
Sign command: /usr/lib/linux-kbuild-6.1/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
applying patch cc_version_check-gcc5.patch...patching file conftest.sh

applying patch bashisms.patch...patching file conftest.sh

applying patch linux-2.6.34-dev_pm_info-runtime_auto.patch...patching file conftest.sh

applying patch 0033-refuse-to-load-legacy-module-if-IBT-is-enabled.patch...patching file nvidia-modeset/nvidia-modeset-linux.c
patching file nvidia/nv.c

applying patch ppc64el.patch...patching file nvidia/nvlink_common.h

applying patch fragile-ARCH.patch...patching file Makefile

applying patch use-kbuild-compiler.patch...patching file Makefile
patching file Kbuild

applying patch use-kbuild-flags.patch...patching file Kbuild
patching file nvidia/nvidia.Kbuild
patching file Makefile
patching file nvidia-modeset/nvidia-modeset.Kbuild

applying patch conftest-verbose.patch...patching file Kbuild

applying patch conftest-prefer-arch-headers.patch...patching file conftest.sh


Building module:
Cleaning build area...
env NV_VERBOSE=1 make -j4 modules KERNEL_UNAME=6.1.0-18-amd64...................(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-18-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-tesla-470/470.223.02/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.1.0-18-amd64 failed!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-6.1.0-18-amd64.postinst line 11.
dpkg: error processing package linux-headers-6.1.0-18-amd64 (--configure):
 installed linux-headers-6.1.0-18-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
 linux-image-amd64 depends on linux-image-6.1.0-18-amd64 (= 6.1.76-1); however:
  Package linux-image-6.1.0-18-amd64 is not configured yet.

dpkg: error processing package linux-image-amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-amd64:
 linux-headers-amd64 depends on linux-headers-6.1.0-18-amd64 (= 6.1.76-1); however:
  Package linux-headers-6.1.0-18-amd64 is not configured yet.

dpkg: error processing package linux-headers-amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-6.1.0-18-amd64
 linux-headers-6.1.0-18-amd64
 linux-image-amd64
 linux-headers-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried unsuccessfully:

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get upgrade --fix-missing
sudo apt --fix-missing update

Last edited by ChasHenry (2024-02-17 02:45)

Offline

#2 2024-02-11 10:46

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

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

There is a problem when upgrading to the current kernel if you use nvidia drivers/firmware in Debian, a fix is on the way and there is nothing really for Q4OS or it's users to do until the next update, best advice would be to roll back to 6.1.0-17 kernel until it is fixed.

Offline

#3 2024-02-11 12:07

ChasHenry
Member
Registered: 2019-03-13
Posts: 44

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

Dai_trying wrote:

There is a problem when upgrading to the current kernel if you use nvidia drivers/firmware in Debian, a fix is on the way and there is nothing really for Q4OS or it's users to do until the next update, best advice would be to roll back to 6.1.0-17 kernel until it is fixed.

Thanks, will wait until the next update.

Offline

#4 2024-02-14 17:29

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

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

Just to update this, a new kernel build is available in the debian proposed-updates repository, I'm not sure if the devs have this repo available but the Debian wiki has some instructions that can safely be used HERE.

Offline

#5 2024-02-14 23:04

ChasHenry
Member
Registered: 2019-03-13
Posts: 44

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

Thanks but it seems this repo is not (yet) available in Synaptic Package Manager.

Offline

#6 2024-02-15 09:18

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

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

You could use the instructions I linked (Debian Wiki) to enable it.

EDIT:
And as a btw, it is the nvidia driver package that will need to be updated and that will allow the kernel to install correctly, apologies for my previous mis-information about it being a kernel problem.

Last edited by Dai_trying (2024-02-15 09:27)

Offline

#7 2024-02-15 23:20

ChasHenry
Member
Registered: 2019-03-13
Posts: 44

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

You could use the instructions I linked (Debian Wiki) to enable it.

$ sudo add-apt-repository 'deb http://deb.debian.org/debian/ stable-proposed-updates main'
Repository: 'deb http://deb.debian.org/debian/ stable-proposed-updates main'
Description:
Archive for codename: stable-proposed-updates components: main
More info: http://deb.debian.org/debian/
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Found existing deb entry in /etc/apt/sources.list.d/archive_uri-http_deb_debian_org_debian_-bookworm.list
Adding deb entry to /etc/apt/sources.list.d/archive_uri-http_deb_debian_org_debian_-bookworm.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-http_deb_debian_org_debian_-bookworm.list
Hit:1 http://deb.debian.org/debian bookworm-updates InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease                      
Hit:3 https://dl.winehq.org/wine-builds/debian bookworm InRelease          
Hit:4 http://security.debian.org bookworm-security InRelease               
Hit:5 http://deb.debian.org/debian bookworm-backports InRelease            
Hit:7 http://deb.debian.org/debian stable-proposed-updates InRelease       
Hit:9 https://packages.mozilla.org/apt mozilla InRelease                   
Hit:6 https://q4os.org/q4repo q4os-5-0-cn InRelease                        
Get:8 https://q4os.org/qextrepo bookworm-plasmalooks-cn InRelease [3,237 B]
Hit:10 https://q4os.org/qextrepo bookworm-firefox-cn InRelease
Fetched 3,237 B in 2s (1,727 B/s)
Reading package lists... Done
W: Conflicting distribution: http://deb.debian.org/debian stable-proposed-updates InRelease (expected stable-proposed-updates but got bookworm-proposed-updates)

I can't figure out what went wrong.

Offline

#8 2024-02-16 10:19

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

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

You need to add non-free section to your source entry, this is mine

deb http://deb.debian.org/debian/ bookworm-proposed-updates main contrib non-free non-free-firmware

Offline

#9 2024-02-17 02:30

ChasHenry
Member
Registered: 2019-03-13
Posts: 44

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

This is the entry of my sources.list
[img=FluxBB bbcode test]file:///home/karl/Desktop/Screenshot_20240217_sources.list.png[/img]

The entry of my my sources.list is:
deb http://deb.debian.org/debian/ stable-proposed-updates main

This is the result of the update/upgrade

$ sudo apt-get update && sudo apt-get dist-upgrade
Hit:1 https://dl.winehq.org/wine-builds/debian bookworm InRelease
Hit:2 http://security.debian.org bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-proposed-updates InRelease
Hit:4 http://deb.debian.org/debian bookworm-updates InRelease
Hit:5 http://deb.debian.org/debian bookworm InRelease
Hit:6 http://deb.debian.org/debian bookworm-backports InRelease
Hit:8 https://packages.mozilla.org/apt mozilla InRelease
Hit:7 https://q4os.org/q4repo q4os-5-0-cn InRelease
Get:9 https://q4os.org/qextrepo bookworm-plasmalooks-cn InRelease [3,237 B]
Hit:10 https://q4os.org/qextrepo bookworm-firefox-cn InRelease
Fetched 3,237 B in 2s (1,344 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

The warning notice relating to "Conflicting distribution" has disappeared

W: Conflicting distribution: http://deb.debian.org/debian stable-proposed-updates InRelease (expected stable-proposed-updates but got bookworm-proposed-updates)

I am not so sure about the unchecked items in Repository...
[img=FluxBB bbcode test]file:///home/karl/Desktop/Screenshot_20240217_Repositories.png[/img]

and Discovery
[img=FluxBB bbcode test]file:///home/karl/Desktop/Screenshot_20240217_Settings - Discovery.png[/img]

edit: I can't figure out on adding screenshots. The unchecked items I am referring to in Synaptic are:
deb http://deb.debian.org/debian/ stable-proposed-updates main
deb-src http://deb.debian.org/debian/ stable-proposed-updates main

and in Discovery:
Debian Stable proposed updates (main)
Debian Stable proposed updates (main) Sources

Last edited by ChasHenry (2024-02-17 02:52)

Offline

#10 2024-02-17 06:58

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

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

You will still need to add the non-free section of the repository, and then run

sudo apt update && sudo apt upgrade

Offline

#11 2024-02-17 12:31

ChasHenry
Member
Registered: 2019-03-13
Posts: 44

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

You will still need to add the non-free section of the repository, and then run

Thanks, I did that but not working - running around circles - Synaptic producing errors - I gave up fixing and re-installed - it's much faster!

Thanks again... Cheers.

Offline

#12 2024-02-17 22:55

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

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

so long as you got it working again that's all good smile

Offline

Board footer

Powered by FluxBB