Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried to install mercurial today, and the power went out. Now, when I try to install any packages, it complains about a couple of different things:

>$ sudo apt-get install mercurial 
[sudo] password: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mercurial is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
hunspell-en-us : Conflicts: 
openoffice.org-core (<= ) but 1:3.2.1-7ubuntu1.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' 
with no packages (or specify a solution).
>$ hg
The program 'hg' is currently not installed.  You can install it by typing:
sudo apt-get install mercurial
>$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  hunspell-en-us
Suggested packages:
  hunspell
The following packages will be upgraded:
  hunspell-en-us
1 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
Need to get 0B/249kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: unable to initialize frontend: Dialog
debconf: falling back to frontend: Readline
warning, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core':
 `<' is obsolete, use `<=' or `<<' instead
warning, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core':
 version value starts with non-alphanumeric, suggest adding a space
dpkg: parse error, in file '/var/lib/dpkg/status' 
near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core': version contains ` '
E: Sub-process /usr/bin/dpkg returned an error code (2)
$ sudo dpkg --purge hunspell-en-us
warning, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core':
 `<' is obsolete, use `<=' or `<<' instead
warning, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core':
 version value starts with non-alphanumeric, suggest adding a space
dpkg: parse error, in file '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us':
 `Conflicts' field, reference to `openoffice.org-core': version contains ` '

I wish I could give you more hints...I tried going into synaptic and filtering by my broken packages...hunspell-en-us does come back as broken...all options fail in almost identical ways to what's posted above.

I'd appreciate any help with this. I'm worried I may have to purge/uninstall/reinstall openoffice.org-core, but that's a little bit too crazy to do before consulting everyone here.

I tried purging too:

>$ sudo apt-get purge
[sudo] password for droogans: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 hunspell-en-us : Conflicts: openoffice.org-core (<= ) but 1:3.2.1-7ubuntu1.1 is installed
E: Unmet dependencies. Try using -f.
>$ sudo apt-get purge -f

This last command didn't do anything different as well. Think it's time to uninstall openoffice, and the 15+ packages that are going down with it?

UPDATE

I decided to try and dig myself out of a hole by selecting "Completely Remove" from synaptic for openoffice.org-core, and allowing it to also take its dependents with it. I was going to reinstall + update each package afterwards, but it still won't let me go through with it. Same error message as before, and now I'm wondering what other options I have.

Everything works fine on my computer...except getting new, updating existing, repairing or removing packages on my machine.

RESOLVED

After running sudo dpkg-reconfigure -a I got this last line, which was a new one:

/usr/sbin/dpkg-reconfigure: acpi-support is not installed

Which, after a quick search, turned up this solution:

$> cd /var/lib/dpkg
$> sudo cp status-old status
$> sudo cp available-old available
$> sudo apt-get install -f

That cleared it up. I had to go into synaptic to get a genuine reinstall, but afterwards, it worked.

Finally. Thanks everyone.

share|improve this question
    
What happens if you do an "apt-get purge" and then attempt again? –  jmreicha Apr 15 '12 at 0:53
1  
Are you able to post that section of the /var/lib/dpkg/status file? Perhaps there really is a squirrely value in there that's confusing things. Search some things like "dpkg status corrupt" for a bit more info. –  fencepost Apr 21 '12 at 0:28
    
@fencepost, you were right. I had to reset my available file as well. –  Droogans Apr 23 '12 at 1:13
add comment

4 Answers

up vote 2 down vote accepted
+50

A dpkg-reconfigure -a helped me out of crashed updates many times. Opposed to dpkg --configure -a it even tries to configure packages again which already had been started to be configured.

share|improve this answer
    
Note: Read my final update. This wasn't the correct answer, but it brought me to it. –  Droogans Apr 23 '12 at 0:57
add comment

sudo apt-get -f install Should fix your problem.

share|improve this answer
    
Care to explain why that should work? –  Ivo Flipse Apr 17 '12 at 15:18
    
My bad didn't notice he already tried to do it.. Try running dpkg with -C so dpkg searches for partially installed packages and suggest what to do to get them working. –  Hugo Barros Apr 17 '12 at 15:58
    
Yeah it's coming back with the exact same error...thanks though. –  Droogans Apr 17 '12 at 17:19
add comment

I'll add a "desperation answer" since you seem urgent to fix it. You might have tried some of these things already.

  • Try using aptitude instead of apg-get. It at least used to be more intelligent than apt-get when it came to conflict resolution, and perhaps it handles this situation differently (though nowadays there isn't much difference between the two, I've heard).
  • Try sudo aptitude purge hunspell-en-us, or even sudo aptitude purge openoffice.org-core and later reinstall them.
  • Download the hunspell-en-us package from debian.org (or from Ubuntu, you haven't said which distribution you are using) and try to install it directly with dpkg.
  • (Safety goggles on for this one:) Try to move the /var/lib/dpkg/status somewhere else and see if that will make it attempt to be rebuilt when using APT. Move it back if it just makes things worse.
share|improve this answer
add comment

sudo dpkg --configure -a should repair your dpkg database. Then update and try installing packages

share|improve this answer
    
Same error listed as above. All three warnings are in '/var/lib/dpkg/status' near line 10469 package 'hunspell-en-us', all three are 'Conflicts' field, reference to 'openoffice.org-core' –  Droogans Apr 17 '12 at 12:51
add comment

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.