Score:0

E: Sub-process /usr/bin/dpkg returned an error code (1) won't leave me alone :'(

sz flag

so... i've spent the past 7 hours of my life trying to update my pc, i fell into an abyss of confusing jargon i don't understand. i've tried everything i can handle trying without being put in a hospital and soon being interviewed for a netflix documentary on how i went insane and my story.

basically.... I try to run 'sudo apt --fix-broken install' as that is what the terminal tells me to do every time i try to do something about updating anything but.... this is what i get out of it

Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libnvidia-gl-390 libnvidia-gl-390:i386
The following NEW packages will be installed:
  libnvidia-gl-390 libnvidia-gl-390:i386
0 upgraded, 2 newly installed, 0 to remove and 2626 not upgraded.
32 not fully installed or removed.
Need to get 0 B/29.2 MB of archives.
After this operation, 149 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up base-files (11ubuntu5.3) ...
Installing new version of config file /etc/debian_version ...
Installing new version of config file /etc/issue ...
Installing new version of config file /etc/issue.net ...
Installing new version of config file /etc/lsb-release ...
Installing new version of config file /etc/update-motd.d/50-motd-news ...
Updating /root/.profile to current default.
motd-news.service is a disabled or a static unit, not starting it.
(Reading database ... 463097 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-390_390.144-0ubuntu0.20.04.1_i386.deb ...
diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340
dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 by libnvidia-gl-390'
  found 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-390_390.144-0ubuntu0.20.04.1_i386.deb (--unpack):
 new libnvidia-gl-390:i386 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../libnvidia-gl-390_390.144-0ubuntu0.20.04.1_amd64.deb ...
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340
dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-390'
  found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-390_390.144-0ubuntu0.20.04.1_amd64.deb (--unpack):
 new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-390_390.144-0ubuntu0.20.04.1_i386.deb
 /var/cache/apt/archives/libnvidia-gl-390_390.144-0ubuntu0.20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

same happens if i run 'sudo apt-get upgrade -f'

Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Preconfiguring packages ...
setting xserver-xorg-legacy/xwrapper/allowed_users from configuration file
(Reading database ... 463097 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-390_390.144-0ubuntu0.20.04.1_i386.deb ...
diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340
dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 by libnvidia-gl-390'
  found 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-390_390.144-0ubuntu0.20.04.1_i386.deb (--unpack):
 new libnvidia-gl-390:i386 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../libnvidia-gl-390_390.144-0ubuntu0.20.04.1_amd64.deb ...
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340
dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-390'
  found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-390_390.144-0ubuntu0.20.04.1_amd64.deb (--unpack):
 new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../bsdutils_1%3a2.34-0.1ubuntu9.1_amd64.deb ...
Unpacking bsdutils (1:2.34-0.1ubuntu9.1) over (1:2.31.1-0.4ubuntu3.7) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-390_390.144-0ubuntu0.20.04.1_i386.deb
 /var/cache/apt/archives/libnvidia-gl-390_390.144-0ubuntu0.20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

i'm very new to ubuntu... let alone linux, i've had a lot of issues but i love it for that. i've had so much fun and just pleasure in general fixing all of them but i've finally had to run to the fourms as any guide had way to much stuff i can't understand. sorry for taking up anyone's time with what is probably just a dumb question.

btw i'm trying to update from 18.04 to 20.04

at least i think

hr flag
These previous Q&As may be helpful: [Nvidia driver installation keeps failing, diversion issues](https://askubuntu.com/questions/1067183/nvidia-driver-installation-keeps-failing-diversion-issues) and [NVIDIA driver problem after apt upgrade ubuntu 18.04](https://askubuntu.com/questions/1072999/nvidia-driver-problem-after-apt-upgrade-ubuntu-18-04)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.