script error while installing nvidia restricted driver

Asked by tadiv on 2008-01-11

So I installed a new VNIDIA card today since I was having SO much trouble with my older Radeon card... When I went to activate the restricted driver, I received an error dialog - a complaint about a script not running properly... Then I notice that there are updates - so I click to update and it fails and tells me to run in a terminal window --
tadiv@tadiv-tv-room:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libglitz-glx1 scantv kwin-style-crystal libglitz1 pia xawtv-plugins v4l-conf
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  xorg-driver-fglrx
0 upgraded, 0 newly installed, 1 to remove and 38 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 27.0MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 118271 files and directories currently installed.)
Removing xorg-driver-fglrx ...
dpkg-divert: rename involves overwriting `/etc/xdg/compiz/compiz-manager' with
  different file `/etc/xdg/compiz/compiz-manager.ubuntu', not allowed
dpkg: error processing xorg-driver-fglrx (--remove):
 subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
 xorg-driver-fglrx
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help?

Thanks,
Tom
Here are the results of that run - another error...

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Wrwrwr
Solved:
2008-01-13
Last query:
2008-01-13
Last reply:
2008-01-12
tadiv (tadiv-comcast) said : #1

Based on data from https://answers.launchpad.net/ubuntu/+question/8408
I tried the following and included are the results...

tadiv@tadiv-tv-room:~$ sudo dpkg -P --force-depends xorg-driver-fglrx && sudo apt-get install -f
[sudo] password for tadiv:
(Reading database ... 118271 files and directories currently installed.)
Removing xorg-driver-fglrx ...
dpkg-divert: rename involves overwriting `/etc/xdg/compiz/compiz-manager' with
  different file `/etc/xdg/compiz/compiz-manager.ubuntu', not allowed
dpkg: error processing xorg-driver-fglrx (--purge):
 subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
 xorg-driver-fglrx

This stuff is greek to me...

Tom

Oliver Muth (dr-o-muth) said : #2

Hi Tom,

have you already tried to remove compiz first?
sudo apt-get -f remove compiz
You could then continue with deinstalling the xorg-driver-fglrx.
sudo apt-get remove xorg-driver-fglrx
and reinstall compiz afterwards.

Best regards

Oliver

tadiv (tadiv-comcast) said : #3

The following is the result... The same error seems to cause a failure...

tadiv@tadiv-tv-room:~$ sudo apt-get -f remove compiz
[sudo] password for tadiv:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libglitz-glx1 scantv kwin-style-crystal libglitz1 pia xawtv-plugins v4l-conf
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  compiz xorg-driver-fglrx
0 upgraded, 0 newly installed, 2 to remove and 38 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 27.1MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 118271 files and directories currently installed.)
Removing xorg-driver-fglrx ...
dpkg-divert: rename involves overwriting `/etc/xdg/compiz/compiz-manager' with
  different file `/etc/xdg/compiz/compiz-manager.ubuntu', not allowed
dpkg: error processing xorg-driver-fglrx (--remove):
 subprocess post-removal script returned error exit status 2
Removing compiz ...
Errors were encountered while processing:
 xorg-driver-fglrx
E: Sub-process /usr/bin/dpkg returned an error code (1)
tadiv@tadiv-tv-room:~$

Tom

Wrwrwr (wrwrwr) said : #4

Try to remove compiz-core as this is the exact package that has this file. Or try to purge because this is configuration data may not get removed with 'remove'.

sudo apt-get purge compiz

(You'll lose your compiz configuration with that, so make a copy.)

Oliver Muth (dr-o-muth) said : #5

Hi Tom,

If this does not help it looks like whatever you do it will try to remove the fglrx-driver first.
So let's force it out:
sudo dpkg -P --force-overwrite,overwrite-diverted xorg-driver-fglrx

And then re-install compiz and compiz-core to make sure that the correct files are in place again:
apt-get -f --reinstall install compiz compiz-core

Best regards

Oliver

tadiv (tadiv-comcast) said : #6

Oliver and Wrwrwr -- no matter what I try, it remembers that it wants to remove xorg-driver-fglrx, tries to do that first, and fails -OR- ir is unhappy about the two different filenames...

tadiv@tadiv-tv-room:~$ sudo apt-get purge compiz-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libglitz-glx1 scantv kwin-style-crystal libglitz1 pia xawtv-plugins v4l-conf
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  compiz-core* compiz-fusion-plugins-extra* compiz-fusion-plugins-main* compiz-gnome* compiz-plugins* xorg-driver-fglrx
0 upgraded, 0 newly installed, 6 to remove and 38 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 39.0MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 118267 files and directories currently installed.)
Removing xorg-driver-fglrx ...
dpkg-divert: rename involves overwriting `/etc/xdg/compiz/compiz-manager' with
  different file `/etc/xdg/compiz/compiz-manager.ubuntu', not allowed
dpkg: error processing xorg-driver-fglrx (--remove):
 subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
 xorg-driver-fglrx
E: Sub-process /usr/bin/dpkg returned an error code (1)
tadiv@tadiv-tv-room:~$

tadiv@tadiv-tv-room:~$ sudo dpkg -P --force-overwrite,overwrite-diverted xorg-driver-fglrx
(Reading database ... 118267 files and directories currently installed.)
Removing xorg-driver-fglrx ...
dpkg-divert: rename involves overwriting `/etc/xdg/compiz/compiz-manager' with
  different file `/etc/xdg/compiz/compiz-manager.ubuntu', not allowed
dpkg: error processing xorg-driver-fglrx (--purge):
 subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
 xorg-driver-fglrx

Tom

tadiv (tadiv-comcast) said : #7

Maybe I should start with a clean install from the Live CD?

Wrwrwr (wrwrwr) said : #8

Hopefully unnecessary :)

Try manually removing (moving) the file in question first:

sudo mv /etc/xdg/compiz/compiz-manager /etc/xdg/compiz/compiz-manager.copy

Wrwrwr (wrwrwr) said : #9

Or better yet what "dpkg-divert" returns? Maybe "dpkg-divert --rename --remove /etc/xdg/compiz/compiz-manager" would help (you may have to put the original file name here; one listed by list)?

Wrwrwr (wrwrwr) said : #10

Sorry last to commands should have been:
sudo dpkg-divert --list
sudo dpkg-divert --rename --remove /etc/xdg/compiz/compiz-manager

tadiv (tadiv-comcast) said : #11

Wrwrwr --

Looks like where you wrote:

Hopefully unnecessary :)

Try manually removing (moving) the file in question first:

sudo mv /etc/xdg/compiz/compiz-manager /etc/xdg/compiz/compiz-manager.copy

Fixed it --

Here are the results of that command followed with one from earlier...

tadiv@tadiv-tv-room:~$ sudo mv /etc/xdg/compiz/compiz-manager /etc/xdg/compiz/compiz-manager.copy
[sudo] password for tadiv:

tadiv@tadiv-tv-room:~$ sudo dpkg -P --force-overwrite,overwrite-diverted xorg-driver-fglrx
(Reading database ... 118267 files and directories currently installed.)
Removing xorg-driver-fglrx ...
Purging configuration files for xorg-driver-fglrx ...
dpkg - warning: while removing xorg-driver-fglrx, directory `/etc/ati' not empty so not removed.
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
tadiv@tadiv-tv-room:~$

Do I need to "move" that file back to its original name??

Tom

Best Wrwrwr (wrwrwr) said : #12

This warning looks like a different thing. I would move or delete the /etc/ati folder too (this is most probably fglrx specific, as i have a radeon with a different driver and there is no such folder).

About the file if it doesn't get recreated after installing nvidia drivers then, yes, probably move it back. Or (probably better) reinstall compiz after installing those drivers. (The file seems to contain just some three lines of a very basic compiz config, nothing that looks like card specific.)

tadiv (tadiv-comcast) said : #13

Thanks Wrwrwr, that solved my question.