Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Since my sudo apt-get upgrade today I have this weird error(s) in the end of each software installation with apt-get, for instance :

    $apt-get -f 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:
  liblzo2-2 uswsusp
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libglu1-mesa
The following NEW packages will be installed:
  libglu1-mesa
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
Need to get 0 B/165 kB of archives.
After this operation, 561 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Selecting previously deselected package libglu1-mesa.
(Reading database ... 140491 files and directories currently installed.)
Unpacking libglu1-mesa (from .../libglu1-mesa_7.10.2-0ubuntu2.1_amd64.deb) ...
Setting up libgl1-mesa-glx (7.10.2-0ubuntu2.1) ...
update-alternatives: error: alternative link /usr/lib/xorg/extra-modules is already managed by x86_64-linux-gnu_gl_conf.
dpkg: error processing libgl1-mesa-glx (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of libglu1-mesa:
 libglu1-mesa depends on libgl1-mesa-glx | libgl1; however:
  Package libgl1-mesa-glx is not configured yet.
  Package libgl1 is not installed.
  Package libgl1-mesa-glx which provides libgl1 is not configured yet.
dpkg: error processing libglu1-mesa (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 libgl1-mesa-glx
 libglu1-mesa
E: Sub-process /usr/bin/dpkg returned an error code (1)

Does anyone know how to repair that ? I have tried apt-get purge or apt-get install on 'these' packages back did not help.

share|improve this question

2 Answers 2

The error is caused by this line:

update-alternatives: error: alternative link /usr/lib/xorg/extra-modules is already managed by x86_64-linux-gnu_gl_conf.

In this case, it's harmless to force configuration of libgl1-mesa-glx and solve your problems.

Run:

sudo dpkg --force-all --configure libgl1-mesa-glx

Followed by:

sudo dpkg --configure -a

And then (just in case):

sudo apt-get -f install

To force-install that specific libgl1-mesa-glx from scratch, please do:

wget http://mirrors.us.kernel.org/ubuntu//pool/main/m/mesa/libgl1-mesa-glx_7.10.2-0ubuntu2.1_amd64.deb
sudo dpkg --force-all -i libgl1-mesa-glx_7.10.2-0ubuntu2.1_amd64.deb
share|improve this answer
    
Thanks for the answer: After that I receive : http://pastebin.com/Kpk3KHtC –  Patryk Jul 11 '12 at 21:25
1  
@lordmonkey: please try sudo dpkg-reconfigure --force libgl1-mesa-glx instead. Are you logged in as root? I noticed you're not using sudo... –  izx Jul 11 '12 at 21:32
    
:/ http://pastebin.com/a7g3pZYD –  Patryk Jul 11 '12 at 21:41
    
@lordmonkey: please see edit at bottom of answer to try force-installing from scratch. –  izx Jul 11 '12 at 21:53
    
which line do you mean exactly ? I have tried sudo apt-get -f instal but it didn't do the trick. –  Patryk Jul 11 '12 at 22:00
up vote 0 down vote accepted

Ok, I have finally fixed it with uninstalling nvidia-common

sudo apt-get purge nvidia-common

and reintalling the drivers with Additional drivers GUI

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.