Re: Apt error (tried other mailing list & Google), please help!

GuidoZ <[email protected]> Thu, 23 Sep 2004 09:40:16 -0700
Newsgroups gmane.linux.conectiva.apt-rpm
Message-ID <[email protected]>
Thanks so much. =)

> It's perfectly normal for the Packages file to change - in fact it'd be
> very worrisome if it didn't after updating some packages since that's the
> rpm database! :)

Well that makes sense. Good to hear it's not completely fubar. =P

>Please run 'strace -estat64 apt-get update' and post the entire output of that

Certainly. This does show some likely culprits...

linux-box:/home/guidoz # strace -estat64 apt-get update
stat64("/var/lib/apt/.", 0xbfffed3c)    = -1 ENOENT (No such file or directory)
stat64("/var/state/apt/.", {st_mode=S_IFDIR|0755, st_size=72, ...}) = 0
stat64("/etc/apt/apt.conf.d/", {st_mode=S_IFDIR|0755, st_size=336, ...}) = 0
stat64("/etc/apt/apt.conf.d/list-extras.conf", {st_mode=S_IFREG|0644,
st_size=102, ...}) = 0
stat64("/etc/apt/apt.conf.d/gpg-import.conf", {st_mode=S_IFREG|0644,
st_size=201, ...}) = 0
stat64("/etc/apt/apt.conf.d/gpg-checker.conf", {st_mode=S_IFREG|0644,
st_size=155, ...}) = 0
stat64("/etc/apt/apt.conf.d/apt.conf", {st_mode=S_IFREG|0644,
st_size=482, ...}) = 0
stat64("/etc/apt/apt.conf.d/pkglog.conf", {st_mode=S_IFREG|0644,
st_size=206, ...}) = 0
stat64("/etc/apt/apt.conf.d/post.conf", {st_mode=S_IFREG|0644,
st_size=101, ...}) = 0
stat64("/etc/apt/apt.conf.d/apt-groupinstall.conf",
{st_mode=S_IFREG|0644, st_size=782, ...}) = 0
stat64("/etc/apt/apt.conf.d/list-nodeps.conf", {st_mode=S_IFREG|0644,
st_size=48, ...}) = 0
stat64("/etc/apt/apt.conf", 0xbfffecac) = -1 ENOENT (No such file or directory)
stat64("%{_dbpath}/packages.rpm", 0xbfffecfc) = -1 ENOENT (No such
file or directory)
stat64("/usr/bin/aptrpm", 0xbfffecfc)   = -1 ENOENT (No such file or directory)
E: Unable to determine a suitable system type

Hmm. Well that's interesting. The first "No such file or directory" is
true. The file it's looking for (which is finds later on I see, plus
errors on again) is at "/etc/apt/apt.conf.d/apt.conf".

The next time it shows trouble is when it's looking for
"packages.rpm". I was unable to find this file when searching the
drive. (Note that nothing else seems to be broken, just apt.)

Lastly, where it's looking for "aptrpm" at the end, here's all there
is to do with apt there:

linux-box:/usr/bin # ls -l apt*
-rwxr-xr-x  1 root root  10034 2004-08-20 03:32 apt   **(note: this is
a shell script)**
-rwxr-xr-x  1 root root  81550 2004-08-20 03:32 apt-cache
-rwxr-xr-x  1 root root 112124 2004-08-20 03:32 apt-cdrom
-rwxr-xr-x  1 root root  18919 2004-08-20 03:32 apt-config
-rwxr-xr-x  1 root root 225741 2004-08-20 03:32 apt-get
-rwxr-xr-x  1 root root 242579 2004-08-20 03:32 apt-shell

I've always used apt-get and didn't have a problem until that night.
There were some errors running it, but that's be cause I had every
components for every server. (It simply said it couldn't find some
components at some servers.) After checking with a web browser, this
held true. Also, Richard helped me fix a small typo in my sources list
that might of caused this error as well. (I had missed a space before
the SuSE directory.)

> Nah, this aint a reason for reinstall, it's just some silly glitch in
> configuration someplace. We'll find it out ...

I'm more of a problem solver myself (rather then a reinstaller). I'll
wait for another reply to hear what's next. =)

--
Peace. ~G


On Thu, 23 Sep 2004 10:30:23 +0300 (EEST), Panu Matilainen
<[email protected]> wrote:
> On Wed, 22 Sep 2004, GuidoZ wrote:
> 
> > Thanks for the reply Panu. I suspect the install was damaged somehow
> > due to the upgrades done by YaST. Here's the result of the command you
> > mentioned:
> >
> > linux-box:/home/guidoz # ls -l /bin/rpm /var/lib/rpm/Packages
> > -rwxr-xr-x  1 root root    18700 2004-04-05 16:39 /bin/rpm
> > -rw-r--r--  1 root root 21417984 2004-09-21 13:06 /var/lib/rpm/Packages
> >
> > Looks like /bin/rpm hasn't been touched, but the 2nd one has been
> > changes recently. I first noticed the problem (as I said previously)
> > the night of the 18th. It was working perfectly up until I did those
> > updates. (All updated packages were listed in my last email.)
> 
> It's perfectly normal for the Packages file to change - in fact it'd be
> very worrisome if it didn't after updating some packages since that's the
> rpm database! :)
> 
> However .. the fact that /bin/rpm is where it should be, this leaves us
> with the question why is apt failing to find it (and thus realize this is
> an rpm system and everything is ok). Please run
> 'strace -estat64 apt-get update' and post the entire output of that, it
> should help finding out what the heck it's looking for. (one possibility
> is that apt's own configuration is telling it to look elsewhere for rpm)
> 
> >
> > I'm more then ready to start from scratch if that would be the best
> > way. What's the best way to go about removing everything so a
> > reinstall will work again? I didn't have any problems making it work
> > after the initial install.
> 
> Nah, this aint a reason for reinstall, it's just some silly glitch in
> configuration someplace. We'll find it out ...
> 
>         - Panu -