Ubuntu – Help! I broke apt-get with partial install of ubuntu-restricted-extras

11.04aptpackage-managementsoftware-center

Possible Duplicate:
Cannot install any software from the Software Center due to ttf-mscorefonts-installer package error

I was trying to install ubuntu-restricted-extras from the command line, as instructed here: Can't play dvd with movie player

Near the end, I came to a EULA screen that wouldn't let me past it. Clicking OK, hitting enter, nothing worked.

After aborting that attempt at installing, I find that attempting to install anything leads to the following message:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 961, in simulate
trans.unauthenticated = self._simulate_helper(trans)
  File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 1085, in _simulate_helper
    return depends, self._cache.required_download, \
File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 226, in required_download
pm.get_archives(fetcher, self._list, self._records)
SystemError: E:I wasn't able to locate file for the ttf-mscorefonts-installer package. This might mean you need to manually fix this package.

(The above was an attempt to install 7zip from the Software Center.)

How do I undo what I've done? Tell me how this can be fixed without re-installing the OS.

I'm not particularly Linux-savvy, so please help me to understand how I can investigate this problem, and hopefully regain the ability to install software without reinstalling the OS.

Best Answer

Here's a good article on what to do when apt-get breaks. http://www.linux.com/archive/feed/48910

Basically, try to re-install with -f flag (to force) the offending package. If that doesn't work try remove, then with -f flag.

Also - a good practice that doesn't seem to be actively encouraged by the Ubuntu installer is to have /home and / on different partitions, so that you can freely reinstall the core OS without affecting most of your settings, which makes recovering from fatal issues easier. Great tip when you're still learning.

Related Question