Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #221298 > unrolled thread

Re: Synaptic error

Started by<tomas@tuxteam.de>
First post2020-04-12 15:50 +0200
Last post2020-04-13 23:10 +0200
Articles 10 — 6 participants

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Synaptic error <tomas@tuxteam.de> - 2020-04-12 15:50 +0200
    Re: Synaptic error Richard Owlett <rowlett@cloud85.net> - 2020-04-12 16:10 +0200
      Re: Synaptic error Reco <recoverym4n@enotuniq.net> - 2020-04-12 16:20 +0200
        Re: Synaptic error Reco <recoverym4n@enotuniq.net> - 2020-04-12 17:50 +0200
          Re: Synaptic error Mark Allums <maa@allums.com> - 2020-04-12 20:00 +0200
        Re: Synaptic error Richard Owlett <rowlett@cloud85.net> - 2020-04-12 17:50 +0200
    Re: Synaptic error Cindy Sue Causey <butterflybytes@gmail.com> - 2020-04-12 17:20 +0200
    Re: Synaptic error David Wright <deblis@lionunicorn.co.uk> - 2020-04-13 02:00 +0200
      Re: Synaptic error Reco <recoverym4n@enotuniq.net> - 2020-04-13 08:00 +0200
        Re: Synaptic error David Wright <deblis@lionunicorn.co.uk> - 2020-04-13 23:10 +0200

#221298 — Re: Synaptic error

From<tomas@tuxteam.de>
Date2020-04-12 15:50 +0200
SubjectRe: Synaptic error
Message-ID<zUL9M-1VT-9@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Sun, Apr 12, 2020 at 08:43:12AM -0500, Richard Owlett wrote:
> Using Synaptic I:
> 1. searched package names for "info"
> 2. selected it
> 3. clicked Apply
> 4. received error message saying
> >E: Could not open lock file /var/cache/apt/archives/lock - open (2: No such file or directory)
> >E: Could not open file descriptor -1
> >E: Unable to lock the download directory

Question: is there a /var/cache/apt/archives directory? There should
be one.

Cheers
-- t

[toc] | [next] | [standalone]


#221306

FromRichard Owlett <rowlett@cloud85.net>
Date2020-04-12 16:10 +0200
Message-ID<zULt8-2ib-7@gated-at.bofh.it>
In reply to#221298
On 04/12/2020 08:46 AM, tomas@tuxteam.de wrote:
> On Sun, Apr 12, 2020 at 08:43:12AM -0500, Richard Owlett wrote:
>> Using Synaptic I:
>> 1. searched package names for "info"
>> 2. selected it
>> 3. clicked Apply
>> 4. received error message saying
>>> E: Could not open lock file /var/cache/apt/archives/lock - open (2: No such file or directory)
>>> E: Could not open file descriptor -1
>>> E: Unable to lock the download directory
> 
> Question: is there a /var/cache/apt/archives directory? There should
> be one.
> 
> Cheers
> -- t
> 

No.
The content of /var/cache/apt is pkgcache.bin  & srcpkgcache.bin  .
As I said, there has been no previous problem with Synaptic.
Where would I look for cause of missing archives sub-directory?
Is it safe to blindly create it?

[toc] | [prev] | [next] | [standalone]


#221307

FromReco <recoverym4n@enotuniq.net>
Date2020-04-12 16:20 +0200
Message-ID<zULCO-2lP-15@gated-at.bofh.it>
In reply to#221306
	Hi.

On Sun, Apr 12, 2020 at 09:07:07AM -0500, Richard Owlett wrote:
> As I said, there has been no previous problem with Synaptic.
> Where would I look for cause of missing archives sub-directory?

Unless you have an audit facility configured in your kernel - you have
to guess.

> Is it safe to blindly create it?

Yep. 0:0 as group:owner, 0755 as permission.

$ ls -ald /var/cache/apt/archives/
drwxr-xr-x 3 root root 4096 Apr 11 12:00 /var/cache/apt/archives/

Reco

[toc] | [prev] | [next] | [standalone]


#221329

FromReco <recoverym4n@enotuniq.net>
Date2020-04-12 17:50 +0200
Message-ID<zUN1U-35z-3@gated-at.bofh.it>
In reply to#221307
On Sun, Apr 12, 2020 at 10:39:34AM -0500, Richard Owlett wrote:
> On 04/12/2020 09:17 AM, Reco wrote:
> > 	Hi.
> > 
> > On Sun, Apr 12, 2020 at 09:07:07AM -0500, Richard Owlett wrote:
> > > As I said, there has been no previous problem with Synaptic.
> > > Where would I look for cause of missing archives sub-directory?
> > 
> > Unless you have an audit facility configured in your kernel - you have
> > to guess.
> 
> Unless an audit facility is installed by default, I don't have it.
> Sounds like something I should read up on.
> Suggested link(s) for someone coming at the subject cold?

apt install auditd

man auditctl

You'll need this:

auditctl -a always,exit -F dir=/var/cache/apt/archives -F perm=wa


> > > Is it safe to blindly create it?
> > 
> > Yep. 0:0 as group:owner, 0755 as permission.
> > 
> > $ ls -ald /var/cache/apt/archives/
> > drwxr-xr-x 3 root root 4096 Apr 11 12:00 /var/cache/apt/archives/
> 
> I created the sub-directory using Caja.
> # ls -ald /var/cache/apt/archives/
> drwxr-xr-x 2 root root 4096 Apr 12 09:41 /var/cache/apt/archives/
> 
> *NOTE* When I ran ls there were only 2 {NOT 3} hard links.
> I attempted to install via Synaptic again.
> The error message was:
> > W: Failed to fetch http://deb.debian.org/debian/pool/main/t/texinfo/install-info_6.3.0.dfsg.1-1+b2_i386.deb
> >   Could not open file /var/cache/apt/archives/partial/install-info_6.3.0.dfsg.1-1+b2_i386.deb - open (2: No such file or directory) [IP: 151.101.52.204 80]
> > 
> > W: Failed to fetch http://deb.debian.org/debian/pool/main/t/texinfo/info_6.3.0.dfsg.1-1+b2_i386.deb
> >   Could not open file /var/cache/apt/archives/partial/info_6.3.0.dfsg.1-1+b2_i386.deb - open (2: No such file or directory) [IP: 151.101.52.204 80]

Your local apt index file is out of sync with the mirror.
They should give a button in Synaptic that performs the equivalent of
"apt-get update".

Reco

[toc] | [prev] | [next] | [standalone]


#221341

FromMark Allums <maa@allums.com>
Date2020-04-12 20:00 +0200
Message-ID<zUP3H-4if-1@gated-at.bofh.it>
In reply to#221329

On 4/12/2020 10:44 AM, Reco wrote:
>
> Your local apt index file is out of sync with the mirror.
> They should give a button in Synaptic that performs the equivalent of
> "apt-get update".
Reload.

[toc] | [prev] | [next] | [standalone]


#221330

FromRichard Owlett <rowlett@cloud85.net>
Date2020-04-12 17:50 +0200
Message-ID<zUN1U-35z-5@gated-at.bofh.it>
In reply to#221307
On 04/12/2020 09:17 AM, Reco wrote:
> 	Hi.
> 
> On Sun, Apr 12, 2020 at 09:07:07AM -0500, Richard Owlett wrote:
>> As I said, there has been no previous problem with Synaptic.
>> Where would I look for cause of missing archives sub-directory?
> 
> Unless you have an audit facility configured in your kernel - you have
> to guess.

Unless an audit facility is installed by default, I don't have it.
Sounds like something I should read up on.
Suggested link(s) for someone coming at the subject cold?

> 
>> Is it safe to blindly create it?
> 
> Yep. 0:0 as group:owner, 0755 as permission.
> 
> $ ls -ald /var/cache/apt/archives/
> drwxr-xr-x 3 root root 4096 Apr 11 12:00 /var/cache/apt/archives/

I created the sub-directory using Caja.
# ls -ald /var/cache/apt/archives/
drwxr-xr-x 2 root root 4096 Apr 12 09:41 /var/cache/apt/archives/

*NOTE* When I ran ls there were only 2 {NOT 3} hard links.
I attempted to install via Synaptic again.
The error message was:
> W: Failed to fetch http://deb.debian.org/debian/pool/main/t/texinfo/install-info_6.3.0.dfsg.1-1+b2_i386.deb
>   Could not open file /var/cache/apt/archives/partial/install-info_6.3.0.dfsg.1-1+b2_i386.deb - open (2: No such file or directory) [IP: 151.101.52.204 80]
> 
> W: Failed to fetch http://deb.debian.org/debian/pool/main/t/texinfo/info_6.3.0.dfsg.1-1+b2_i386.deb
>   Could not open file /var/cache/apt/archives/partial/info_6.3.0.dfsg.1-1+b2_i386.deb - open (2: No such file or directory) [IP: 151.101.52.204 80]

Suspecting Synaptic being the problem, I did "apt-get install info".
There was no problem.
There is now a /var/cache/apt/archives/partial directory.
This is in line with what Cindy says elsewhere in this thread.
Following her example, I've included all the details for future newbies.

[toc] | [prev] | [next] | [standalone]


#221320

FromCindy Sue Causey <butterflybytes@gmail.com>
Date2020-04-12 17:20 +0200
Message-ID<zUMyR-2Vq-3@gated-at.bofh.it>
In reply to#221298
On 4/12/20, tomas@tuxteam.de <tomas@tuxteam.de> wrote:
> On Sun, Apr 12, 2020 at 08:43:12AM -0500, Richard Owlett wrote:
>> Using Synaptic I:
>> 1. searched package names for "info"
>> 2. selected it
>> 3. clicked Apply
>> 4. received error message saying
>> >E: Could not open lock file /var/cache/apt/archives/lock - open (2: No
>> > such file or directory)
>> >E: Could not open file descriptor -1
>> >E: Unable to lock the download directory
>
> Question: is there a /var/cache/apt/archives directory? There should
> be one.


DISCLAIMER: I see Reco's very succinct answer. Kudos! I decided to
still send mine out. Maybe it will help a newbie somewhere get to know
their own system better somehow. I can still remember the first time
of TRUSTING command line package management. Major YEEHAW! moment in
my Linux usage overall. I've never looked back. :)

So my observation to this thread is........

Maybe this is a Synaptic thing that it doesn't work when that lock's
missing AND that it doesn't recreate that lock file on the fly?

As tomas asked, what about... looking first to see if there actually
is that file in place to see if it's falsely being reported as
missing? (Sounds like that's a done deal.)

Then, if it really *is* missing: What *I* would try since I've been in
this spot in various similarly different scenarios is run something
like "apt(-get) upgrade".

That command might easily put that file back in place. It did for me
just now. That command then stops and waits for user interaction. The
action can be cancel(l)ed without any further system changes
occurring.

The reason I know to try that is because that lock file and the ones
at "/var/lib/dpkg/lock" and "/var/lib/dpkg/lock-frontend" will, on
rare occasion, get locked up for whatever reasons. If I "delete" those
by renaming so they're still available as backup then rerun an
affected apt(-get) command, things go back to normal when dpkg and/or
apt(-get) recreate those lock files on the fly.

It's odd to me that Synaptic's not replacing a missing lock file, but
it may be on purpose by Developer design. Or maybe Synaptic doesn't
"know how" to do that... or doesn't have the right permissions reach
deeper into the system or something... ?

It occurred to me to check the dotDEB archive files for both dpkg and
apt since I experience this with both of them. Nope, neither package
contains those files as part of their base installation. Rightly or
wrongly, that causes me to a-sume those lock files are generated on
the fly, at least on the first run of a program after installation..

OR in instances such as my experiences where I have to force the
situation via lock file deletion WHEN my setup... locks up for
whatever reason.

To test that theory, I just ran "apt-get update", and those three
files maintained their previous creation time stamps that are at least
an hour old... or two days old because I JUST encountered this with
dpkg a couple days ago (TWICE). That implies to me that they're
initially generated then stand their ground in that creation state
until borked again at some future point in time.

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* hops with birdseed *

[toc] | [prev] | [next] | [standalone]


#221357

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2020-04-13 02:00 +0200
Message-ID<zUUG6-7I5-3@gated-at.bofh.it>
In reply to#221298
On Sun 12 Apr 2020 at 15:46:45 (+0200), tomas@tuxteam.de wrote:
> On Sun, Apr 12, 2020 at 08:43:12AM -0500, Richard Owlett wrote:
> > Using Synaptic I:
> > 1. searched package names for "info"
> > 2. selected it
> > 3. clicked Apply
> > 4. received error message saying
> > >E: Could not open lock file /var/cache/apt/archives/lock - open (2: No such file or directory)
> > >E: Could not open file descriptor -1
> > >E: Unable to lock the download directory
> 
> Question: is there a /var/cache/apt/archives directory? There should
> be one.

The impression given by the FHS is that, upon deletion, the system
should be able to recreate anything in a cache directory. I suspect
that running something like apt-get update might do it. (It's not
always clear exactly whose responsibility such recreation is.)

5.5. /var/cache : Application cache data
5.5.1. Purpose
       /var/cache is intended for cached data from applications. Such
       data is locally generated as a result of time-consuming I/O or
       calculation. The application must be able to regenerate or
       restore the data. Unlike /var/spool, the cached files can be
       deleted without data loss. The data must remain valid between
       invocations of the application and rebooting the system.

       Files located under /var/cache may be expired in an application
       specific manner, by the system administrator, or both. The
       application must always be able to recover from manual deletion
       of these files (generally because of a disk space shortage). No
       other requirements are made on the data format of the cache
       directories.
[FHS 3.0]

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#221363

FromReco <recoverym4n@enotuniq.net>
Date2020-04-13 08:00 +0200
Message-ID<zV0it-2NM-5@gated-at.bofh.it>
In reply to#221357
	Hi.

On Sun, Apr 12, 2020 at 06:50:04PM -0500, David Wright wrote:
> On Sun 12 Apr 2020 at 15:46:45 (+0200), tomas@tuxteam.de wrote:
> > On Sun, Apr 12, 2020 at 08:43:12AM -0500, Richard Owlett wrote:
> > > Using Synaptic I:
> > > 1. searched package names for "info"
> > > 2. selected it
> > > 3. clicked Apply
> > > 4. received error message saying
> > > >E: Could not open lock file /var/cache/apt/archives/lock - open (2: No such file or directory)
> > > >E: Could not open file descriptor -1
> > > >E: Unable to lock the download directory
> > 
> > Question: is there a /var/cache/apt/archives directory? There should
> > be one.
> 
> The impression given by the FHS is that, upon deletion, the system
> should be able to recreate anything in a cache directory.

That is assuming that the cache directory itself is existing (i.e.
/var/cache, and everything down the filesystem hierarchy that's needed).
Note that FHS part you're quoting specifically refers to the "files",
not anything else.

A small distinction, but it's important here.

Reco

[toc] | [prev] | [next] | [standalone]


#221459

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2020-04-13 23:10 +0200
Message-ID<zVev7-3pg-7@gated-at.bofh.it>
In reply to#221363
On Mon 13 Apr 2020 at 08:54:25 (+0300), Reco wrote:
> On Sun, Apr 12, 2020 at 06:50:04PM -0500, David Wright wrote:
> > On Sun 12 Apr 2020 at 15:46:45 (+0200), tomas@tuxteam.de wrote:
> > > On Sun, Apr 12, 2020 at 08:43:12AM -0500, Richard Owlett wrote:
> > > > Using Synaptic I:
> > > > 1. searched package names for "info"
> > > > 2. selected it
> > > > 3. clicked Apply
> > > > 4. received error message saying
> > > > >E: Could not open lock file /var/cache/apt/archives/lock - open (2: No such file or directory)
> > > > >E: Could not open file descriptor -1
> > > > >E: Unable to lock the download directory
> > > 
> > > Question: is there a /var/cache/apt/archives directory? There should
> > > be one.
> > 
> > The impression given by the FHS is that, upon deletion, the system
> > should be able to recreate anything in a cache directory.
> 
> That is assuming that the cache directory itself is existing (i.e.
> /var/cache, and everything down the filesystem hierarchy that's needed).
> Note that FHS part you're quoting specifically refers to the "files",
> not anything else.

I think you're right, of course, and it's probably necessary to dpkg -S
(or grep /var/lib/dpkg/info/*list) for the directory/ies, and reinstall
their creator, apt, after manually downloading it (in the absence of
hints given here).

Cheers,
David.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web