Re: repairing damage to package manager

2017-03-25 Thread Jochen Spieker
songbird:
> Chuck Hallenbeck wrote:
>> 
>> One more O.T. observation: Debian let me do a truly dumb thing, but I
>> wouldn't have it any other way.
> 
>   who here hasn't done an erroneous rm or some
> other fumble fingered thing?
> 
>   a few weeks ago i was working on tagging some
> pictures and didn't notice that i had selected 
> 9000 of them instead of the few i intended.  then
> i deleted the tags.  there is no way to interrupt
> this.  oops.  i had to go find the backup files 
> and restore the database which held the tags.

Good point. I cannot stress the need for backups enough. Every couple of
months someone approaches me because they have important data on a dying
disk. Right now it hit my best man who should really know better.

(No, uninstalling apt would not be covered by my backups either. But as
we have seen, you can recover from issues like this easily in many
cases. :))

J.
-- 
Watching television is more hip than actually speaking to anyone.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: repairing damage to package manager

2017-03-25 Thread songbird
Chuck Hallenbeck wrote:
>Jochen Spieker wrote:
>> Chuck Hallenbeck:
>> > 
>> > # apt-get remove upgrade-system apt
>> 
>> Nice one! This brightens my day a little as it reminds me how I found
>> out the relationship betweent the commands available on MSDOS 5.0 and
>> the contents of the C:\DOS directory. :) I don't know how many times I
>> had deleted stuff from there until it finally hit me.
>> 
>> Anyway, it's great of you not to be too embarassed to ask this and it is
>> even better that you could get help so quickly. It was more difficult
>> with MSDOS and no internet back then.
>
> Well, I have to tell you, I did hesitate to ask. But the help I got was
> not only quick, but right on target.  The trick is to learn from other
> people's mistakes, not one's own.
>
> One more O.T. observation: Debian let me do a truly dumb thing, but I
> wouldn't have it any other way.

  who here hasn't done an erroneous rm or some
other fumble fingered thing?

  a few weeks ago i was working on tagging some
pictures and didn't notice that i had selected 
9000 of them instead of the few i intended.  then
i deleted the tags.  there is no way to interrupt
this.  oops.  i had to go find the backup files 
and restore the database which held the tags.
luckily i did make a backup of my work and that 
was all it was to restore the tags instead of 
having to actually go dig up the 9000 picture
files again.


  songbird



Re: repairing damage to package manager

2017-03-25 Thread Lisi Reisz
On Friday 24 March 2017 19:57:56 Chuck Hallenbeck wrote:
> One more O.T. observation: Debian let me do a truly dumb thing, but I
> wouldn't have it any other way.

:-)))  +1

Lisi



Re: repairing damage to package manager

2017-03-24 Thread Jochen Spieker
Chuck Hallenbeck:
> 
> One more O.T. observation: Debian let me do a truly dumb thing, but I
> wouldn't have it any other way.

That's the spirit!

J.
-- 
If I am asked 'How are you' more than a million times in my life I
promise to explode.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: repairing damage to package manager

2017-03-24 Thread Chuck Hallenbeck
Hi J.,

On Fri, Mar 24, 2017 at 08:47:18PM +0100, Jochen Spieker wrote:
> Chuck Hallenbeck:
> > 
> > # apt-get remove upgrade-system apt
> 
> Nice one! This brightens my day a little as it reminds me how I found
> out the relationship betweent the commands available on MSDOS 5.0 and
> the contents of the C:\DOS directory. :) I don't know how many times I
> had deleted stuff from there until it finally hit me.
> 
> Anyway, it's great of you not to be too embarassed to ask this and it is
> even better that you could get help so quickly. It was more difficult
> with MSDOS and no internet back then.

Well, I have to tell you, I did hesitate to ask. But the help I got was
not only quick, but right on target.  The trick is to learn from other
people's mistakes, not one's own.

One more O.T. observation: Debian let me do a truly dumb thing, but I
wouldn't have it any other way.

Chuck

> 
> J.
> -- 
> I am getting worse rather than better.
> [Agree]   [Disagree]
>  



-- 
When a clock is hungry it goes back four seconds.



Re: repairing damage to package manager

2017-03-24 Thread Jochen Spieker
Chuck Hallenbeck:
> 
> # apt-get remove upgrade-system apt

Nice one! This brightens my day a little as it reminds me how I found
out the relationship betweent the commands available on MSDOS 5.0 and
the contents of the C:\DOS directory. :) I don't know how many times I
had deleted stuff from there until it finally hit me.

Anyway, it's great of you not to be too embarassed to ask this and it is
even better that you could get help so quickly. It was more difficult
with MSDOS and no internet back then.

J.
-- 
I am getting worse rather than better.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: repairing damage to package manager

2017-03-24 Thread Chuck Hallenbeck
Hi,


On Fri, Mar 24, 2017 at 03:22:06PM -0400, songbird wrote:
> Chuck Hallenbeck wrote:
> ...
> > I presume you are suggesting using wget to retrieve the missing
> > packages after identifying their URL's? 
> 
>   if you haven't cleared /var/cache/apt/archives you
> can check what is in there by:
> 
> $ ls /var/cache/apt/archives/*.deb | grep apt and
> see what versions are showing up.
> 
> then if they are still there you can try
> dpkg -i on the latest versions
> 
> 
>   songbird

That's good to know for future problems, but I managed to find the
correct download link, retrieved it, and it installed okay with the 
dpkg -i command. I ran apt-get update and apt-get upgrade with no
errors and nothing to do, so perhaps I am in the clear.

Thanks for the help. 

Chuck



-- 
When a clock is hungry it goes back four seconds.



Re: repairing damage to package manager

2017-03-24 Thread songbird
Chuck Hallenbeck wrote:
...
> I presume you are suggesting using wget to retrieve the missing
> packages after identifying their URL's? 

  if you haven't cleared /var/cache/apt/archives you
can check what is in there by:

$ ls /var/cache/apt/archives/*.deb | grep apt and
see what versions are showing up.

then if they are still there you can try
dpkg -i on the latest versions


  songbird



Re: repairing damage to package manager

2017-03-24 Thread Mark Fletcher
On Fri, Mar 24, 2017 at 11:53:59AM -0400, Chuck Hallenbeck wrote:
> 
> I presume you are suggesting using wget to retrieve the missing
> packages after identifying their URL's? 
> 

Yeah, or just download the package from packages.debian.org with a web 
browser, and then use dpkg -i on it.

Check the dependency this for the package and consider whether you might 
need to (re-)download any of those in addition. Hopefully not, but...

Mark



Re: repairing damage to package manager

2017-03-24 Thread Chuck Hallenbeck
Hi Jonathan,

On Fri, Mar 24, 2017 at 03:40:52PM +, Jonathan Dowland wrote:
> On Fri, Mar 24, 2017 at 11:30:31AM -0400, Chuck Hallenbeck wrote:
> > dpkg-reconfigure doesn't help, nor dpkg -i apt-get.
> 
> "apt-get" exists in the "apt" package, but "dpkg -i" takes an argument to
> a local .deb archive, not a package name. Try downloading a .deb of apt
> for your version of debian and architecture (e.g. amd64 for stable/jessie
> => https://packages.debian.org/jessie/apt bottom of the page) and running
> 
>   dpkg -i 
> 
> This might fail with missing dependencies. If so, you can attempt to manually
> download them too, and then retry, this time adding the dependencies to the
> dpkg invocation:
> 
>   dpkg -i   
> 
> This may need repeating for missing dependencies for the second .deb.
> 
> If you still have your install media handy, mounting them might speed this
> process up as the necessary .deb files will all be on there (modulo security
> updates since then).
> 
> But you might tire of playing whack'a'mole with missing .deb dependencies with
> the above technique: it's hard to say how many there might be or how long this
> process might take, to weigh up whether to do this or just reinstall.
> 

I presume you are suggesting using wget to retrieve the missing
packages after identifying their URL's? 

I appreciate your suggestion, I'll see what I can do.

Chuck



Re: repairing damage to package manager

2017-03-24 Thread Jonathan Dowland
On Fri, Mar 24, 2017 at 11:30:31AM -0400, Chuck Hallenbeck wrote:
> dpkg-reconfigure doesn't help, nor dpkg -i apt-get.

"apt-get" exists in the "apt" package, but "dpkg -i" takes an argument to
a local .deb archive, not a package name. Try downloading a .deb of apt
for your version of debian and architecture (e.g. amd64 for stable/jessie
=> https://packages.debian.org/jessie/apt bottom of the page) and running

dpkg -i 

This might fail with missing dependencies. If so, you can attempt to manually
download them too, and then retry, this time adding the dependencies to the
dpkg invocation:

dpkg -i   

This may need repeating for missing dependencies for the second .deb.

If you still have your install media handy, mounting them might speed this
process up as the necessary .deb files will all be on there (modulo security
updates since then).

But you might tire of playing whack'a'mole with missing .deb dependencies with
the above technique: it's hard to say how many there might be or how long this
process might take, to weigh up whether to do this or just reinstall.

-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Jonathan Dowland
⢿⡄⠘⠷⠚⠋⠀ 
⠈⠳⣄ Please do not CC me, I am subscribed to the list.


signature.asc
Description: Digital signature


Re: repairing damage to package manager

2017-03-24 Thread Chuck Hallenbeck
Correction below:


On Fri, Mar 24, 2017 at 11:30:31AM -0400, Chuck Hallenbeck wrote:
> Hi folks,
> 
> I've been using Debian Stretch for a couple of months, and following
> this list for a month or two. I'm afraid I did something stupid anyway,
> and find myself with a damaged apt-get and can't figure out how to fix
> it short of reinstalling.
> 
> Here is what I did to damage it:
> 
> The discussion about automatic upgrading contained a reference to
> "upgrade-system"  and I decided to give it a try.
> 
> I installed it, placed a recommended set of preferences in
> /etc/apt/preferences.d with a legally named file,  and executed it
> 
> # upgrade-system
> 
> It should me what it wanted to do, mostly no surprises, except it's
> last item wanted to remove dozens and dozens of things, some of which I
> recognized as things I manually requested in connection with an earlier
> (and abandoned) experiment.
> 
> So I said "no" to the prompt. So far so good.
> 
> After a bit, I decided to back out of my interest in upgrade-system,
> and remove it with apt-get remove.
> 
> And here is what I think was stupid:
> 
> I had also played with the command "apt" which is another front to
> apt-get and friends, and perhaps misremembered whether it was already
> present, or whether I had to install it to play with it. What I did
> that was stupid was to add it to the packages to remove, so I entered
> this:
> 
> # apt-get remove upgrade-system apt
> 
> I am now unable to use any of my familiar package tools. Although
> "which" shows me apt-get, it cannot be found when attempting to execute
Sorry! apt-get is not shown by which. aptitude is.


> it. Running aptitude complains about not finding apt-get.
> dpkg-reconfigure doesn't help, nor dpkg -i apt-get.
> 
> Is there anything I can do short of reinstalling? I am no beginner, but
> I am pretty new to Debian.  I am using a base system with a screen
> reader, no desktop. (which I installed with the netinst CD image on
> purpose, despite the defaults, which I don't regard as a problem).
> 
> If I can get out of this one, I promise never to do a stupid thing
> again.
> 
> Chuck
> 
> 
> 
> -- 
> When a clock is hungry it goes back four seconds.

-- 
When a clock is hungry it goes back four seconds.



repairing damage to package manager

2017-03-24 Thread Chuck Hallenbeck
Hi folks,

I've been using Debian Stretch for a couple of months, and following
this list for a month or two. I'm afraid I did something stupid anyway,
and find myself with a damaged apt-get and can't figure out how to fix
it short of reinstalling.

Here is what I did to damage it:

The discussion about automatic upgrading contained a reference to
"upgrade-system"  and I decided to give it a try.

I installed it, placed a recommended set of preferences in
/etc/apt/preferences.d with a legally named file,  and executed it

# upgrade-system

It should me what it wanted to do, mostly no surprises, except it's
last item wanted to remove dozens and dozens of things, some of which I
recognized as things I manually requested in connection with an earlier
(and abandoned) experiment.

So I said "no" to the prompt. So far so good.

After a bit, I decided to back out of my interest in upgrade-system,
and remove it with apt-get remove.

And here is what I think was stupid:

I had also played with the command "apt" which is another front to
apt-get and friends, and perhaps misremembered whether it was already
present, or whether I had to install it to play with it. What I did
that was stupid was to add it to the packages to remove, so I entered
this:

# apt-get remove upgrade-system apt

I am now unable to use any of my familiar package tools. Although
"which" shows me apt-get, it cannot be found when attempting to execute
it. Running aptitude complains about not finding apt-get.
dpkg-reconfigure doesn't help, nor dpkg -i apt-get.

Is there anything I can do short of reinstalling? I am no beginner, but
I am pretty new to Debian.  I am using a base system with a screen
reader, no desktop. (which I installed with the netinst CD image on
purpose, despite the defaults, which I don't regard as a problem).

If I can get out of this one, I promise never to do a stupid thing
again.

Chuck



-- 
When a clock is hungry it goes back four seconds.