Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Before starting with my problem description, I would like to say that this is my very first time using Ubuntu or anything related to Linux!

Now my question!

I have installed the very last distribution of Ubuntu in my laptop (MSI FX620DX).

After a few updates I tried to install new applications such like Gparted or Synaptic... but it has been impossible to even get the package installed.

The same happens with any other application that I would like to install.

After launching the installation I get each time the same message:

*Package operation failed
The installation or removal of a software package failed.
installArchives() failed: (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 158448 files and directories currently installed.)
Removing xserver-common-lts-raring ...
Removing 'diversion of /usr/lib/xorg/protocol.txt to /usr/lib/xorg/protocol-precise.txt by xserver-common-lts-raring'
dpkg-divert: error: rename involves overwriting `/usr/lib/xorg/protocol.txt' with
  different file `/usr/lib/xorg/protocol-precise.txt', not allowed
dpkg: error processing xserver-common-lts-raring (--remove):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:

I have tried several things that I found in different forums, but I could not find a solution for this.

Any idea or suggestion please?

Update: When I run the software updater,it says that only a partial upgrade is possible.

Then I get the following msg:

    Could not install 'xserver-common-lts-raring'
    subprocess installed post-removal script returned error exit status 2

    Could not install the upgrades

    The upgrade has aborted. Your system could be in an unusable state. A recovery will run now (dpkg --configure -a).  

Any clue??


    rs@rs-GE620-GE620DX-FX620DX-FX623:~$ sudo uname -a
    [sudo] password for rs: 
    Linux rs-GE620-GE620DX-FX620DX-FX623 3.8.0-32-generic #47-Ubuntu SMP Tue Oct 1         22:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    rs@rs-GE620-GE620DX-FX620DX-FX623:~$ sudo lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 13.04
    Release:    13.04
    Codename:   raring

    rs@rs-GE620-GE620DX-FX620DX-FX623:~$ sudo dpkg -l | grep xserver-xorg-video-intel
    ii  xserver-xorg-video-intel                  2:2.21.6-0ubuntu4.3                      amd64        X.Org X server -- Intel i8xx, i9xx    display driver
    rc  xserver-xorg-video-intel-lts-raring        2:2.21.6-0ubuntu4.1~precise1            amd64        X.Org X server -- Intel i8xx, i9xx display driver
share|improve this question

marked as duplicate by Avinash Raj, Radu Rădeanu, Sneetsher, Eric Carvalho, karel May 7 '14 at 13:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Edit your question and paste the output of these commands: sudo uname -a, sudo lsb_release -a and sudo dpkg -l | grep xserver-xorg-video-intel – Saurav Kumar Oct 6 '13 at 10:54

This solved it for me- Go to /var/lib/dpkg/info Edit xserver-common-lts-raring.postrm Remove the if-else condition completely. Also, had removed -e from the first line (read somewhere). Would suggest keeping a backup of the file in case an issue happens later on.

share|improve this answer

After this solution to a somehow similar problem, maybe you should run apt-get install -f and if that fails too, perhaps try apt-get install xserver-xorg-video-intel-lts-raring, or with a -f, as the update in the link suggests. And if it was me, I would also try purging and reinstalling xserver-xorg-video-intel, probably to no avail but who knows, though, Of course many here know.

share|improve this answer

Make sure you put grub on your /dev/sda ( your HDD ) and not on the ext3 partition. In other words when installing Ubuntu set your Device for boot loader installation to /dev/sda or sdb or sdc... At least that's what turned out to be the problem in my case...

share|improve this answer

Here's what I did:

cd /usr/lib/xorg/
sudo mv protocol.txt protocol.txt.backup
apt-get -f install

So you cd into the directory where the problem file lives, change the problem file's name so it is not referenced by the shell script that runs during update (which is where the problem appears to be), and then run the fix broken install command.

However, I'm not sure this is the best way to fix this problem.

share|improve this answer

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