3

I've been trying to upgrade my version on Ubuntu from 9.10 to 10.04 (and eventually to the latest), but I'm having trouble with broken packages.

I've tried:

  • apt-get update
  • apt-get upgrade
  • apt-get dist-upgrade
  • dpkg --configure -a (not sure why)

I'm not sure what's relevant, so I'm going to dump what I've got:

Output from upgrade attempt:

$ sudo do-release-upgrade
Checking for a new ubuntu release
Done Upgrade tool signature
Done Upgrade tool
Done downloading            
extracting 'lucid.tar.gz'
authenticate 'lucid.tar.gz' against 'lucid.tar.gz.gpg' 
tar: Removing leading `/' from member names

Reading cache

Checking package manager
Reading package lists: Done
Reading state information: Done
Reading state information: Done
Reading state information: Done
Done downloading            
Reading package lists: Done
Reading state information: Done
Reading state information: Done
Reading state information: Done

Updating repository information
WARNING: Failed to read mirror file
Done downloading            

Checking package manager
Reading package lists: Donelucid-security/multiverse Packages: 96   gutsy/restricted Packages: 02  
Reading state information: Done
Reading state information: Done
Reading state information: Done

Calculating the changes

Calculating the changes

Could not calculate the upgrade 

An unresolvable problem occurred while calculating the upgrade: 
E:Unable to correct problems, you have held broken packages. 

This can be caused by: 
* Upgrading to a pre-release version of Ubuntu 
* Running the current pre-release version of Ubuntu 
* Unofficial software packages not provided by Ubuntu 

If none of this applies, then please report this bug against the 
'update-manager' package and include the files in 
/var/log/dist-upgrade/ in the bug report. 


Restoring original system state

Aborting
Reading package lists: Donekarmic-security/multiverse Packages: 95   utsy/restricted Packages: 02  
Reading state information: Done
Reading state information: Done
Reading state information: Done

/etc/apt/sources.list (with most of the comments stripped)

$ cat sources.list
# deb cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091028.5)]/ karmic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
deb http://us.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic main restricted

deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates main restricted

deb http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe

deb http://us.archive.ubuntu.com/ubuntu/ karmic multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates multiverse

# deb http://us.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu karmic partner
deb-src http://archive.canonical.com/ubuntu karmic partner

deb http://security.ubuntu.com/ubuntu karmic-security main restricted
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted
deb http://security.ubuntu.com/ubuntu karmic-security universe
deb-src http://security.ubuntu.com/ubuntu karmic-security universe
deb http://security.ubuntu.com/ubuntu karmic-security multiverse
deb-src http://security.ubuntu.com/ubuntu karmic-security multiverse

## Packages for Chrome
#deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
#deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main

## Latest PHP packages
#deb http://php53.dotdeb.org stable all
#deb-src http://php53.dotdeb.org stable all
#deb http://security.ubuntu.com/ubuntu jaunty-security main

The last few lines of /var/log/dist-upgrade/main.log

2011-08-02 19:21:54,211 DEBUG entry 'deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse' updated to new dist
2011-08-02 19:21:54,246 DEBUG running doUpdate() (showErrors=True)
2011-08-02 19:22:24,895 DEBUG openCache()
2011-08-02 19:22:24,895 DEBUG failed to SystemUnLock() (E:Not locked)
2011-08-02 19:22:29,991 DEBUG /openCache(), new cache size 30853
2011-08-02 19:22:29,991 DEBUG needServerMode(): run in 'desktop' mode, (because of pkg 'ubuntu-desktop')
2011-08-02 19:26:29,025 DEBUG Installing 'upstart-logd' (priority in required set 'required' but not scheduled for install)
2011-08-02 19:26:30,695 ERROR Dist-upgrade failed: 'E:Unable to correct problems, you have held broken packages.'
2011-08-02 19:26:30,696 DEBUG abort called
2011-08-02 19:26:30,697 DEBUG openCache()
2011-08-02 19:26:30,698 DEBUG failed to SystemUnLock() (E:Not locked)
2011-08-02 19:26:33,728 DEBUG /openCache(), new cache size 29182
2011-08-02 19:26:33,728 DEBUG enabling apt cron job
0

4 Answers 4

4

I'd try removing the Gutsy CD line:

deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
0
2

I think the clue is in the error message -

its complaining about Gutsy being present. In your sources.list file you have the CDROM as deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted d

Using the Software Sources window - untick the CDROM. Alternatively, just add a # against this line in your sources.list file.

0
1

More than likely, your problem is due to the presence of PPA packages installed on your machine. Since the PPA has newer packages than the official repositories, the upgrade doesn't know how to replace them. Luckily, this is an easy fix with ppa-purge. Check out the article below, or just Google ppa-purge for more info.

http://bigbrovar.aoizora.org/index.php/2010/01/10/how-to-safely-remove-ppa-repository-from-ubuntu/

4
  • Is there a way to figure out what the offending repo is?
    – PMV
    Aug 3, 2011 at 0:24
  • @PMV- Not that I know of. I would start with the chromium ppa you have installed, and see if that fixes it. If that fails, grep your /etc/sources/list.d/ folder for ppa and go down the list.
    – Bryan Agee
    Aug 3, 2011 at 0:30
  • Maybe try restoring to the default list, then adding them in one at a time until it fails Aug 3, 2011 at 0:30
  • 1
    @Simon- that likely wouldn't affect anything, since the failure is due to installed packages, not sources.
    – Bryan Agee
    Aug 3, 2011 at 0:32
1

If you have aptitude sudo aptitude search ~b will give you the list of broken packages. You'll most likely recognise which ppa/packages you should remove.

You can remove them by installing older version once you remove PPA, (apt-get install package=version) or you can force remove it with dpkg force remove.

Since it didn't fix the problem you can do it more Debian way. Replace you sources.list content with ubuntu 10.04 sources.list and perform aptitude dist-upgrade. You might end up with several broken packages, but you'll be easily able to fix it by reinstalling them (if you don't have anything important configured manually you can purge those packages and install them).

If it did not work there is another option (but it's ugly):

I had an accident with an upgrade from 8.04 to 8.10 (broken packages, upgrade stopped in the middle) and the solution I used to recover was to remove everything but ubuntu-minimal (and a few related things, mainly wifi drivers, you can do this easily in ncurses ui for aptitude, simply type sudo aptitude without any params) and install ubuntu-desktop after switching to new sources.list and upgrading the system via dist-upgrade.

It will work, since it's very easy to upgrade minimal system and it will keep your configuration for most of stuff.

But at this point, if you have your /home/ dir on a separate partition and you don't have anything important configured by hand (especially /etc/ dir) it would be much easier to install a fresh copy of whatever new Ubuntu you like.

1
  • I was able to get rid of a few packages, but still get the same error when trying to upgrade.
    – PMV
    Aug 3, 2011 at 1:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .