LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   nvidia-glx-amd64 won't upgrade due to conflicting library (https://www.linuxquestions.org/questions/linux-general-1/nvidia-glx-amd64-wont-upgrade-due-to-conflicting-library-4175580760/)

wolverene13 05-26-2016 08:32 AM

nvidia-glx-amd64 won't upgrade due to conflicting library
 
Hi All,

I have been searching forums and bug reports trying to figure this out, but I'm afraid the solutions I find don't fix my problem, and some of the suggestions I find are specific to the OP's particular system. I'm not savvy enough to translate that into something I can use on mine, unfortunately. So anyway, I don't even remember why at this point, but I was attempting to do an aptitude update/upgrade for an unrelated issue, when the upgrade of the nvidia-glx package failed. Here is the output from aptitude:

Code:

name@server:~$ sudo aptitude upgrade
Resolving dependencies...               
The following partially installed packages will be configured:
  libgl1-nvidia-glx libxvmcnvidia1 nvidia-glx xserver-xorg-video-nvidia
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up libgl1-nvidia-glx:amd64 (304.131-1) ...
ERROR: The conflicting library '/usr/lib/libGL.so.1.2' is known to dpkg.
diversion by glx-diversions from: /usr/lib/libGL.so.1.2
diversion by glx-diversions to: /usr/lib/mesa-diverted/libGL.so.1.2
dpkg: error processing libgl1-nvidia-glx:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libxvmcnvidia1:amd64:
 libxvmcnvidia1:amd64 depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.

dpkg: error processing libxvmcnvidia1:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of xserver-xorg-video-nvidia:
 xserver-xorg-video-nvidia depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.

dpkg: error processing xserver-xorg-video-nvidia (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-glx:
 nvidia-glx depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.
 nvidia-glx depends on libxvmcnvidia1 (= 304.131-1); however:
  Package libxvmcnvidia1:amd64 is not configured yet.
 nvidia-glx depends on xserver-xorg-video-nvidia (= 304.131-1); however:
  Package xserver-xorg-video-nvidia is not configured yet.

dpkg: error processing nvidia-glx (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libgl1-nvidia-glx:amd64
 libxvmcnvidia1:amd64
 xserver-xorg-video-nvidia
 nvidia-glx
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up libgl1-nvidia-glx:amd64 (304.131-1) ...
ERROR: The conflicting library '/usr/lib/libGL.so.1.2' is known to dpkg.
diversion by glx-diversions from: /usr/lib/libGL.so.1.2
diversion by glx-diversions to: /usr/lib/mesa-diverted/libGL.so.1.2
dpkg: error processing libgl1-nvidia-glx:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of xserver-xorg-video-nvidia:
 xserver-xorg-video-nvidia depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.

dpkg: error processing xserver-xorg-video-nvidia (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libxvmcnvidia1:amd64:
 libxvmcnvidia1:amd64 depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.

dpkg: error processing libxvmcnvidia1:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-glx:
 nvidia-glx depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.
 nvidia-glx depends on libxvmcnvidia1 (= 304.131-1); however:
  Package libxvmcnvidia1:amd64 is not configured yet.
 nvidia-glx depends on xserver-xorg-video-nvidia (= 304.131-1); however:
  Package xserver-xorg-video-nvidia is not configured yet.

dpkg: error processing nvidia-glx (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libgl1-nvidia-glx:amd64
 xserver-xorg-video-nvidia
 libxvmcnvidia1:amd64
 nvidia-glx

I figured I could at least try and see where libGL.so.1.2 actually is, and found the following:

Code:

name@server:~$ locate libGL.so.1.2
/usr/lib/libGL.so.1.2
/usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1.2

So it looks like I have 3 versions of the same library. It looks like one links to another (which is the i386 version), whereas the third is the 64 bit version. For the record, I am using a 64 bit system.

Code:

name@server:~$ ls -la /usr/lib/libGL.so.1.2
lrwxrwxrwx 1 root root 50 Jul  6  2015 /usr/lib/libGL.so.1.2 -> /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2
name@server:~$ ls -la /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2
-rw-r--r-- 1 root root 362860 Jun  5  2013 /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2

How should I go about correcting this? Any help would be greatly appreciated.

Thanks,
wolverene13

business_kid 05-26-2016 11:28 AM

Here's the core of it.

/usr/lib/libGL.so.1.2 is from Mesa, not part of Nvidia's binary blob.
/usr/lib/libGL.so.<nvidia-version-number> is what Nvidia call their conflicting library. Both the binaries are in /usr/lib/, and you point the symlinks (e.g. libGL.so, & libGL.so.1) at the one you need. That process somehow went wrong. Try this command
Code:

ls -lh /usr/lib/libGL*
The symlinks have to point to Nvidia's libs for their binary blob to work. They point to Mesa libs if you're running OSS drivers. Choose, and make it so.

It's not just libGL.so - they change 2 or 3 libs.

wolverene13 05-26-2016 03:02 PM

Thanks for the info - I ran the command that you suggested, and here's the output. However I see only simlinks to mesa related libraries and not "regular" libraries. Should there be NVIDIA related stuff here?

Code:

name@server:~$ ls -lh /usr/lib/libGL*
-rw-r--r-- 1 root root 185K Feb 15  2012 /usr/lib/libGLC.a
lrwxrwxrwx 1 root root  15 Feb 15  2012 /usr/lib/libGLC.so -> libGLC.so.0.0.7
lrwxrwxrwx 1 root root  15 Feb 15  2012 /usr/lib/libGLC.so.0 -> libGLC.so.0.0.7
-rw-r--r-- 1 root root 122K Feb 15  2012 /usr/lib/libGLC.so.0.0.7
lrwxrwxrwx 1 root root  50 Jul  6  2015 /usr/lib/libGL.so.1 -> /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2
lrwxrwxrwx 1 root root  50 Jul  6  2015 /usr/lib/libGL.so.1.2 -> /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2


business_kid 05-27-2016 12:47 AM

I would agree.

What happens when you reinstall the nvidia binary blob?

wolverene13 06-02-2016 11:27 AM

It yells at me saying that I can't install the .run file because I installed the NVIDIA drivers from the Debian repo. Should I maybe uninstall the existing drivers and reinstall from the repo? Or should I do the same, and retry the .run file manually?

business_kid 06-03-2016 12:48 AM

I would uninstall & reinstall, and do it with the repo first. If the repo is far behind the website version,c heck everything is supported.


If that fails, I might try the binary drivers. But I'd watch it closely. Log actions and check it. Debian do a couple of things differently than other distros.

wolverene13 06-03-2016 08:53 PM

Well that certainly didn't go well. See below.

Code:

name@server:~$ sudo aptitude remove nvidia-glx
[sudo] password for name:
The following packages will be REMOVED: 
  nvidia-glx
The following partially installed packages will be configured:
  libgl1-nvidia-glx libxvmcnvidia1 xserver-xorg-video-nvidia
0 packages upgraded, 0 newly installed, 1 to remove and 53 not upgraded.
Need to get 0 B of archives. After unpacking 915 kB will be freed.
(Reading database ... 263962 files and directories currently installed.)
Removing nvidia-glx ...
Processing triggers for nvidia-alternative ...
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/nvidia/current because link group nvidia is broken
Processing triggers for glx-alternative-nvidia ...
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/nvidia because link group glx is broken
Setting up libgl1-nvidia-glx:amd64 (304.131-1) ...
ERROR: The conflicting library '/usr/lib/libGL.so.1.2' is known to dpkg.
diversion by glx-diversions from: /usr/lib/libGL.so.1.2
diversion by glx-diversions to: /usr/lib/mesa-diverted/libGL.so.1.2
dpkg: error processing libgl1-nvidia-glx:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libxvmcnvidia1:amd64:
 libxvmcnvidia1:amd64 depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.

dpkg: error processing libxvmcnvidia1:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of xserver-xorg-video-nvidia:
 xserver-xorg-video-nvidia depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.

dpkg: error processing xserver-xorg-video-nvidia (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libgl1-nvidia-glx:amd64
 libxvmcnvidia1:amd64
 xserver-xorg-video-nvidia
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up libgl1-nvidia-glx:amd64 (304.131-1) ...
ERROR: The conflicting library '/usr/lib/libGL.so.1.2' is known to dpkg.
diversion by glx-diversions from: /usr/lib/libGL.so.1.2
diversion by glx-diversions to: /usr/lib/mesa-diverted/libGL.so.1.2
dpkg: error processing libgl1-nvidia-glx:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of xserver-xorg-video-nvidia:
 xserver-xorg-video-nvidia depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.

dpkg: error processing xserver-xorg-video-nvidia (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libxvmcnvidia1:amd64:
 libxvmcnvidia1:amd64 depends on libgl1-nvidia-glx (= 304.131-1); however:
  Package libgl1-nvidia-glx:amd64 is not configured yet.

dpkg: error processing libxvmcnvidia1:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libgl1-nvidia-glx:amd64
 xserver-xorg-video-nvidia
 libxvmcnvidia1:amd64

It looks like even when uninstalling, it can't because there's unconfigured packages that fall victim to the conflicting library issue too.

business_kid 06-04-2016 01:41 AM

Street! Do you often get that from dpkg?


This would happen if you uninstalled under X, as it would be using the driver then. Can you shut down to run level 3 or so and try there?

wolverene13 07-23-2016 10:17 PM

Sorry for the huge time lapse, I just got back to this. I believe I fixed it, although it was a bit unorthodox. I merely removed the simlink for /usr/lib/libGL.so.1, /usr/lib/libGL.so.1.2, and removed /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2 altogether, then did an update/upgrade (which finally worked) and reinstalled nvidia-glx to put everything back together. Do you know of any way to check and see that everything is working other than maybe rebooting and making sure video still works?

wolverene13 07-23-2016 10:31 PM

Nevermind, figured it out. I also had to reinstall libgl1-mesa-glx to add the /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2 part back in, then create the simlinks to /usr/lib/libGL.so.1 and /usr/lib/libGL.so.1.2 because certain things started complaining that they couldn't find those two rascals. Thanks for the help!

business_kid 07-24-2016 01:07 AM

It's usually a case of either or, I.e Mesa's or Nvidia's libGL.so stuff. Glad you are sorted.


All times are GMT -5. The time now is 06:55 PM.