Hi folks,
I recently did a clean install of 18.04 and used the GUI to switch from Noveau to nvidia-driver-390. After a couple of weeks, the PC began booting only one monitor (I have three), and when I checked under 'Additional Drivers' I saw that the system had automatically fallen back to Noveau. I put it back to Nvidia, but when I tried to install my next package, it said that the package management system is broken. I have since spent almost an entire day going in circles (I'll forcibly uninstall the broken packages but then be without my screens, and if I manage to reinstall it, it eventually breaks the package manager). I've tried many commands and adding 32-bit architecture -- nothing seems to lead to a permanent solution.
Here's the current runaround if I try to install, say, Wireshark.
Code:
sudo apt-get install wiresharkReading package lists... Done
Building dependency tree
Reading state information... Done
wireshark is already the newest version (2.4.5-1).
wireshark set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libnvidia-ifr1-390 : Depends: libnvidia-gl-390 but it is not going to be installed
Breaks: libnvidia-ifr1-390:i386 (!= 390.48-0ubuntu3) but 390.77-0ubuntu0~gpu18.04.1 is to be installed
libnvidia-ifr1-390:i386 : Depends: libnvidia-gl-390:i386 but it is not going to be installed
Breaks: libnvidia-ifr1-390 (!= 390.77-0ubuntu0~gpu18.04.1) but 390.48-0ubuntu3 is to be installed
nvidia-driver-390 : Depends: libnvidia-gl-390 (= 390.77-0ubuntu0~gpu18.04.1) but it is not going to be installed
Depends: libnvidia-ifr1-390 (= 390.77-0ubuntu0~gpu18.04.1) but 390.48-0ubuntu3 is to be installed
Recommends: libnvidia-gl-390:i386 (= 390.77-0ubuntu0~gpu18.04.1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Code:
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
lib32gcc1 libc6-i386 xserver-xorg-legacy
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libnvidia-gl-390 libnvidia-gl-390:i386 libnvidia-ifr1-390
The following NEW packages will be installed:
libnvidia-gl-390 libnvidia-gl-390:i386
The following packages will be upgraded:
libnvidia-ifr1-390
1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
15 not fully installed or removed.
Need to get 0 B/29.3 MB of archives.
After this operation, 147 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 254949 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-390_390.77-0ubuntu0~gpu18.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.77-0ubuntu0~gpu18.04.1_i386.deb (--unpack):
new libnvidia-gl-390:i386 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../libnvidia-ifr1-390_390.77-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking libnvidia-ifr1-390:amd64 (390.77-0ubuntu0~gpu18.04.1) over (390.48-0ubuntu3) ...
dpkg: error processing archive /var/cache/apt/archives/libnvidia-ifr1-390_390.77-0ubuntu0~gpu18.04.1_amd64.deb (--unpack):
trying to overwrite shared '/usr/share/doc/libnvidia-ifr1-390/changelog.Debian.gz', which is different from other instances of package libnvidia-ifr1-390:amd64
Preparing to unpack .../libnvidia-gl-390_390.77-0ubuntu0~gpu18.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.77-0ubuntu0~gpu18.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.77-0ubuntu0~gpu18.04.1_i386.deb
/var/cache/apt/archives/libnvidia-ifr1-390_390.77-0ubuntu0~gpu18.04.1_amd64.deb
/var/cache/apt/archives/libnvidia-gl-390_390.77-0ubuntu0~gpu18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Synaptic will flag the broken packages, but if I manage to remove them, I simply fall back to Noveau on my next restart. I tried to upgrade one and got this output
Code:
E: /var/cache/apt/archives/libnvidia-gl-390_390.77-0ubuntu0~gpu18.04.1_amd64.deb: new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2


Any ideas? I'm trying really hard to not install a previous distro from scratch as I feel as I've done that too many times: but cannot live without either a proper display driver or package manager!
Any help appreciated!
Bookmarks