Strange problem with apt

Carlos Picazzo ojaiguy at gmail.com
Fri Oct 6 23:29:05 UTC 2006


Thanks for the reply Steve.

I didn't know about the dpkg-divert command but yeah, that's probably the
one that's got me screwed up.  But the 'ar x' and 'tar -zxvf' commands
(which I actually use sometimes) just extract the contents of the
data.tar.gz file onto the fs but don't straighten anything out WRT dpkg,
right?  I'll give it a go just to make sure but that was always my
understanding.

Thanks again Steve!

Carlos

On 10/6/06, Steve Flynn <anothermindbomb at gmail.com> wrote:
>
> On 06/10/06, Carlos Picazzo <ojaiguy at gmail.com> wrote:
> >
> > I just tried installing the gpsd package but it apparently had some
> > issues installing. Now any time I try using apt or dpkg, I get:
> >
> > "fgets gave an empty string from diversions [i]"
> >
> > What's that all about? My system is in a completely hosed state right
> > now as I can't install or uninstall that package using apt or dpkg.
> >
> > Does anyone know what might have happened? I've been using Debian and
> > Ubuntu for a few years now and have never seen that error. Google doesn't
> > come up with much either so I'm not sure what my options are
> >
> > Thanks,
> >
> > Carlos
> >
> > PS: Here's the output of 'apt-get install -f':
> >
> > ---
> > # apt-get install -f
> > Reading package lists... Done
> > Building dependency tree... Done
> > The following extra packages will be installed:
> > gpsd
> > Suggested packages:
> > hotplug
> > Recommended packages:
> > gpsd-clients
> > The following packages will be upgraded:
> > gpsd
> > 1 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
> > 1 not fully installed or removed.
> > Need to get 0B/207kB of archives.
> > After unpacking 618kB of additional disk space will be used.
> > Do you want to continue [Y/n]?
> > Preconfiguring packages ...
> > dpkg: fgets gave an empty string from diversions [i]
> > E: Sub-process /usr/bin/dpkg returned an error code (2)
> >
>
> If would seem that gpsd has a diversion file, but it's empty... I don't
> know if this will help you but,
>
> The dpkg-divert command
>
>
>
> File *diversions* are a way of forcing dpkg not to install a file into its
> default location, but to a *diverted* location. Diversions can be used
> through the Debian package scripts to move a file away when it causes a
> conflict. System administrators can also use a diversion to override a
> package's configuration file, or whenever some files (which aren't marked as
> conffiles) need to be preserved by dpkg, when installing a newer version
> of a package which contains those files.
>
>
>
>      # dpkg-divert [--add]   filename # add "diversion"
>
>      # dpkg-divert --remove filename  # remove "diversion"
>
>  if the dpkg command is broken follow this
>
>
>
> A broken dpkg may make it impossible to install any .deb files. A
> procedure like the following will help you recover from this situation. (In
> the first line, you can replace "links" with your favorite browser command.)
>
>
>
>
>      $ links http:// http.us.debian.org/debian/pool/main/d/dpkg/
>
>        ... download the good dpkg_ version_arch.deb
>
>      $ su
>
>      password: *****
>
>      # ar x dpkg_version _arch.deb
>
>      # mv data.tar.gz /data.tar.gz
>
>      # cd /
>
>      # tar xzfv data.tar.gz
>
> For i386, http://packages.debian.org/dpkg may also be used as the URL.
>
> --
> Steve
> Despair - It's always darkest just before it goes pitch black...
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061006/f6e48b0a/attachment.html>


More information about the ubuntu-users mailing list