Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #179254 > unrolled thread
| Started by | Chuck Hallenbeck <chuckhallenbeck@gmail.com> |
|---|---|
| First post | 2017-03-24 16:40 +0100 |
| Last post | 2017-03-25 20:10 +0100 |
| Articles | 13 — 6 participants |
Back to article view | Back to linux.debian.user
repairing damage to package manager Chuck Hallenbeck <chuckhallenbeck@gmail.com> - 2017-03-24 16:40 +0100
Re: repairing damage to package manager Jonathan Dowland <jmtd@debian.org> - 2017-03-24 16:50 +0100
Re: repairing damage to package manager Chuck Hallenbeck <chuckhallenbeck@gmail.com> - 2017-03-24 17:00 +0100
Re: repairing damage to package manager Mark Fletcher <mark27q1@gmail.com> - 2017-03-24 17:00 +0100
Re: repairing damage to package manager songbird <songbird@anthive.com> - 2017-03-24 20:30 +0100
Re: repairing damage to package manager Chuck Hallenbeck <chuckhallenbeck@gmail.com> - 2017-03-24 20:40 +0100
Re: repairing damage to package manager Chuck Hallenbeck <chuckhallenbeck@gmail.com> - 2017-03-24 16:50 +0100
Re: repairing damage to package manager Jochen Spieker <ml@well-adjusted.de> - 2017-03-24 20:50 +0100
Re: repairing damage to package manager Chuck Hallenbeck <chuckhallenbeck@gmail.com> - 2017-03-24 21:00 +0100
Re: repairing damage to package manager Jochen Spieker <ml@well-adjusted.de> - 2017-03-24 22:20 +0100
Re: repairing damage to package manager Lisi Reisz <lisi.reisz@gmail.com> - 2017-03-25 12:20 +0100
Re: repairing damage to package manager songbird <songbird@anthive.com> - 2017-03-25 19:20 +0100
Re: repairing damage to package manager Jochen Spieker <ml@well-adjusted.de> - 2017-03-25 20:10 +0100
| From | Chuck Hallenbeck <chuckhallenbeck@gmail.com> |
|---|---|
| Date | 2017-03-24 16:40 +0100 |
| Subject | repairing damage to package manager |
| Message-ID | <toztL-3Ao-5@gated-at.bofh.it> |
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.
[toc] | [next] | [standalone]
| From | Jonathan Dowland <jmtd@debian.org> |
|---|---|
| Date | 2017-03-24 16:50 +0100 |
| Message-ID | <tozDr-3Gl-1@gated-at.bofh.it> |
| In reply to | #179254 |
[Multipart message — attachments visible in raw view] — view raw
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 <path to downloaded .deb file> 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 <path to .deb file 1> <path to .deb file 2> 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.
[toc] | [prev] | [next] | [standalone]
| From | Chuck Hallenbeck <chuckhallenbeck@gmail.com> |
|---|---|
| Date | 2017-03-24 17:00 +0100 |
| Message-ID | <tozN7-3JX-1@gated-at.bofh.it> |
| In reply to | #179255 |
Hi Jonathan, On Fri, Mar 24, 2017 at 03:40:52PM +0000, 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 <path to downloaded .deb file> > > 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 <path to .deb file 1> <path to .deb file 2> > > 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
[toc] | [prev] | [next] | [standalone]
| From | Mark Fletcher <mark27q1@gmail.com> |
|---|---|
| Date | 2017-03-24 17:00 +0100 |
| Message-ID | <tozN8-3JX-9@gated-at.bofh.it> |
| In reply to | #179257 |
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
[toc] | [prev] | [next] | [standalone]
| From | songbird <songbird@anthive.com> |
|---|---|
| Date | 2017-03-24 20:30 +0100 |
| Message-ID | <toD4m-679-25@gated-at.bofh.it> |
| In reply to | #179257 |
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
[toc] | [prev] | [next] | [standalone]
| From | Chuck Hallenbeck <chuckhallenbeck@gmail.com> |
|---|---|
| Date | 2017-03-24 20:40 +0100 |
| Message-ID | <toDe4-6aU-47@gated-at.bofh.it> |
| In reply to | #179275 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Chuck Hallenbeck <chuckhallenbeck@gmail.com> |
|---|---|
| Date | 2017-03-24 16:50 +0100 |
| Message-ID | <tozDs-3Gl-17@gated-at.bofh.it> |
| In reply to | #179254 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Jochen Spieker <ml@well-adjusted.de> |
|---|---|
| Date | 2017-03-24 20:50 +0100 |
| Message-ID | <toDnI-6fP-13@gated-at.bofh.it> |
| In reply to | #179254 |
[Multipart message — attachments visible in raw view] — view raw
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]
<http://archive.slowlydownward.com/NODATA/data_enter2.html>
[toc] | [prev] | [next] | [standalone]
| From | Chuck Hallenbeck <chuckhallenbeck@gmail.com> |
|---|---|
| Date | 2017-03-24 21:00 +0100 |
| Message-ID | <toDxo-6lE-7@gated-at.bofh.it> |
| In reply to | #179280 |
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] > <http://archive.slowlydownward.com/NODATA/data_enter2.html> -- When a clock is hungry it goes back four seconds.
[toc] | [prev] | [next] | [standalone]
| From | Jochen Spieker <ml@well-adjusted.de> |
|---|---|
| Date | 2017-03-24 22:20 +0100 |
| Message-ID | <toEMN-7q1-17@gated-at.bofh.it> |
| In reply to | #179281 |
[Multipart message — attachments visible in raw view] — view raw
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]
<http://archive.slowlydownward.com/NODATA/data_enter2.html>
[toc] | [prev] | [next] | [standalone]
| From | Lisi Reisz <lisi.reisz@gmail.com> |
|---|---|
| Date | 2017-03-25 12:20 +0100 |
| Message-ID | <toRTH-8qP-9@gated-at.bofh.it> |
| In reply to | #179281 |
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
[toc] | [prev] | [next] | [standalone]
| From | songbird <songbird@anthive.com> |
|---|---|
| Date | 2017-03-25 19:20 +0100 |
| Message-ID | <toYsa-4Ag-13@gated-at.bofh.it> |
| In reply to | #179281 |
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
[toc] | [prev] | [next] | [standalone]
| From | Jochen Spieker <ml@well-adjusted.de> |
|---|---|
| Date | 2017-03-25 20:10 +0100 |
| Message-ID | <toZex-5f5-15@gated-at.bofh.it> |
| In reply to | #179316 |
[Multipart message — attachments visible in raw view] — view raw
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]
<http://archive.slowlydownward.com/NODATA/data_enter2.html>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web