sean finney on 15 Nov 2011 02:45:04 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] using dpkg to update a package


On Mon, Nov 14, 2011 at 01:30:27PM -0500, Eric at Lucii.org wrote:
> dpkg -i virtualbox-4.1_4.1.4-74291~Ubuntu~lucid_i386.deb
> 
> dpkg: regarding virtualbox-4.1_4.1.4-74291~Ubuntu~lucid_i386.deb containing virtualbox-4.1:
>  virtualbox-4.1 conflicts with virtualbox
>   virtualbox-4.0 provides virtualbox and is present and installed.
> dpkg: error processing virtualbox-4.1_4.1.4-74291~Ubuntu~lucid_i386.deb (--install):
>  conflicting packages - not installing virtualbox-4.1
> Errors were encountered while processing:
>  virtualbox-4.1_4.1.4-74291~Ubuntu~lucid_i386.deb
> 
> Presumably it's because it's going from 4.0 to 4.1 ?

You're not actually upgrading a package, you're installing a new package,
virtualbox-4.1 (the version is part of the package name in this case).  The
problem is that the old virtualbox-4.0 package "Provides:" a virtual package
named "virtualbox", which the new virtualbox-4.1 likely Conflicts: with
and also Provides:.

If all you have is dpkg, then what you did in the later mail with --purge
(or just --remove) was correct, though I'd say if you're installing arbitrary
.debs on your system with dpkg you're probably missing on a better way of
doing things.

Assuming this comes from a PPA, it's much, much, better to add the
ppa to your sources.list (there's even a helpful command for that on
ubuntu systems, apt-add-repository), and then do an "apt-get install
virtualbox-4.1" instead of manually inserting packages.  This will
not only help resolve these type of dependency issues (and they can
be much, much worse) at install time, but in future upgrades as well,
and as a bonus you get and easier way to keep the package up to date,
and to keep track of where the package comes from (via apt-cache policy).


	sean

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug