LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   apt-get stuck on upgrade... (https://www.linuxquestions.org/questions/debian-26/apt-get-stuck-on-upgrade-714466/)

guthrie 03-25-2009 10:38 PM

apt-get stuck on upgrade...
 
I tried to install Ntop, and it gave a several unmet dependencies, including one for a 2.6 kernel, which then turned out to be a "virtual package", etc..

So I did an update and upgrade, and now apt seems stuck.

Help requested! :-)
--------------------------------------------------------
alpha:/home/local# apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc6
Suggested packages:
glibc-doc libc6-i686
The following packages will be upgraded:
libc6
1 upgraded, 0 newly installed, 0 to remove and 505 not upgraded.
1 not fully installed or removed.
Need to get 0B/4438kB of archives.
After unpacking 401kB disk space will be freed.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 67950 files and directories currently installed.)
Preparing to replace libc6 2.3.6.ds1-13etch8 (using .../archives/libc6_2.7-18_i386.deb) ...
Checking for services that may need to be restarted...
Checking init scripts...
WARNING: POSIX threads library NPTL requires kernel version
2.6.8 or later. If you use a kernel 2.4, please upgrade it
before installing glibc.

The installation of a 2.6 kernel _could_ ask you to install a new libc
first, this is NOT a bug, and should *NOT* be reported. In that case,
please add etch sources to your /etc/apt/sources.list and run:
apt-get install -t etch linux-image-2.6
Then reboot into this new kernel, and proceed with your upgrade
dpkg: error processing /var/cache/apt/archives/libc6_2.7-18_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.7-18_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

AlucardZero 03-26-2009 08:25 AM

As it says: If you use a kernel 2.4, please upgrade it before installing glibc.

You didn't mention what version Debian or kernel you're running. Since you seem to still be running a 2.4 kernel, you have a rocky road ahead of you because of how out of date your kernel and the rest of your system are. I'd advise upgrading to at least Etch; make sure to read the release notes, esp. the section on upgrading.

guthrie 03-26-2009 10:23 PM

uname -a
Linux alpha 2.6.3-1-386 #2 Tue Feb 24 20:20:23 EST 2004 i686 GNU/Linux

I tried to do that, bu manually 'apt-get install'ing each thing it said was missing, but seem to be caught in "a maze of twisty little passages, all the same".

I did an upgrade, and think that took me to 2.6 (=etch, lenny?). I'll go and read the release notes, but in general would have hoped that things would be a bit more automatic, and loop free! :-)

I think the above indicates that I am at 2.6 kernel; so what's wrong?

guthrie 03-26-2009 10:38 PM

The notes at:
http://www.howtoforge.com/how-to-upg...o-debian-lenny

indicate that an upgrade from an older system must be done in stages, which I did not try to do.
I assumed that apt would take care of whatever upgrade/update issues there were.

Misplaced trust?

farslayer 03-27-2009 09:48 AM

Testing 20,000+ packages for an upgrade from one version of Debian to the next is hard enough to manage. Trying to extend that testing back over multiple versions would bring the entire process to a complete halt. So the staged approach makes sense. Why create more work for the developers than they already have ?

If you are on Sarge (which I believe you are) you need to upgrade to Etch first, then to Lenny, reading the release notes about each upgrade along the way. Aptitude is amazing, but unfortunately it's not magical, nor does it have Super Cow powers..

Code:

it-lenny:~# apt-get moo
        (__)
        (oo)
  /------\/
  / |    || 
 *  /\---/\
    ~~  ~~ 
...."Have you mooed today?"...


guthrie 03-27-2009 02:32 PM

upgrade problems..
 
Thanks. Two quick points;

1) I was not trying to minimize the complexity and challenge of these tools. But if some upgrade paths are known to be dangerous or failures, it would seem (from a distance) that the tool could check for that and warn, or prevent one from improper usage to upgrade.

More basically, as a user of the apt tools I would not expect them to fail, or kill my system without a warning.

2) Since my uname reports 2.6 kernel, I would have thought that meant lenny. How do I confirm where I am?
[Linux alpha 2.6.3-1-386]

I think the link I referred to did suggests an incremental upgrade path from sarge, but my apt is stuck, and won't seem to do (install) anything, it keeps giving the referenced error message.

So, what to do next?

My sources.list all point to stable.

farslayer 03-27-2009 04:02 PM

Maybe we can tell if this file hasn't been modified yet...
cat /etc/debian_version

guthrie 03-27-2009 04:57 PM

version for upgrade:
 
/etc/debian_version = 4.0

guthrie 03-29-2009 09:59 PM

apt-get - still stuck
 
I converted all apt/sources.list to etch, and did update+upgrade, and it seems stable there. Then converted to stable (=lenny), with a sources from etch (as per apt-get's instructions), and it keeps failing.

Then I did the upgrade as described at how-to-forge.com,
but it gets stuck.

I think I am doing everything it says, but I can't seem to get from etch to lenny. Details below.

All help appreciated!
================================================
alpha:/usr/X11R6/bin# apt-get update
...
Fetched 3B in 0s (3B/s)
Reading package lists... Done

alpha:/usr/X11R6/bin# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
The following packages have been kept back:
...
349 upgraded, 0 newly installed, 0 to remove and 128 not upgraded.
Need to get 0B/166MB of archives.
After unpacking 60.8MB of additional disk space will be used.
Do you want to continue [Y/n]?
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 57982 files and directories currently installed.)
Preparing to replace libc6 2.3.6.ds1-13etch9+b1 (using .../archives/libc6_2.7-18_i386.deb) ...
Checking for services that may need to be restarted...
Checking init scripts...
WARNING: POSIX threads library NPTL requires kernel version
2.6.8 or later. If you use a kernel 2.4, please upgrade it
before installing glibc.

The installation of a 2.6 kernel _could_ ask you to install a new libc
first, this is NOT a bug, and should *NOT* be reported. In that case,
please add etch sources to your /etc/apt/sources.list and run:
apt-get install -t etch linux-image-2.6
Then reboot into this new kernel, and proceed with your upgrade
dpkg: error processing /var/cache/apt/archives/libc6_2.7-18_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.7-18_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

alpha:/usr/X11R6/bin# apt-get install -t etch linux-image-2.6
Reading package lists... Done
Building dependency tree... Done
Package linux-image-2.6 is a virtual package provided by:
linux-image-2.6.26-1-xen-686 2.6.26-13lenny2
linux-image-2.6.26-1-vserver-686-bigmem 2.6.26-13lenny2
linux-image-2.6.26-1-vserver-686 2.6.26-13lenny2
linux-image-2.6.26-1-openvz-686 2.6.26-13lenny2
linux-image-2.6.26-1-amd64 2.6.26-13lenny2
linux-image-2.6.26-1-686-bigmem 2.6.26-13lenny2
linux-image-2.6.26-1-686 2.6.26-13lenny2
linux-image-2.6.26-1-486 2.6.26-13lenny2
You should explicitly select one to install.
E: Package linux-image-2.6 has no installation candidate

alpha:/usr/X11R6/bin# apt-get install -f linux-image-2.6.26-1-486 2.6.26-13lenny2
Reading package lists... Done
Building dependency tree... Done
E: Couldn't find package 2.6.26-13lenny2

alpha:/usr/X11R6/bin# apt-get install -f linux-image-2.6.26-1-486
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
initramfs-tools libc6 libselinux1 libvolume-id0 udev
Suggested packages:
locales glibc-doc libc6-i686 linux-doc-2.6.26
Recommended packages:
busybox busybox-initramfs
The following NEW packages will be installed:
initramfs-tools libvolume-id0 linux-image-2.6.26-1-486 udev
The following packages will be upgraded:
libc6 libselinux1
2 upgraded, 4 newly installed, 0 to remove and 475 not upgraded.
Need to get 20.6MB/25.1MB of archives.
After unpacking 60.6MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ftp.us.debian.org stable/main libvolume-id0 0.125-7 [76.1kB]
Get:2 http://security.debian.org stable/updates/main linux-image-2.6.26-1-486 2.6.26-13lenny2 [20.2MB]
Get:3 http://ftp.us.debian.org stable/main udev 0.125-7 [253kB]
Get:4 http://ftp.us.debian.org stable/main initramfs-tools 0.92o [75.3kB]
Fetched 20.6MB in 54s (378kB/s)
Preconfiguring packages ...
(Reading database ... 57982 files and directories currently installed.)
Preparing to replace libc6 2.3.6.ds1-13etch9+b1 (using .../archives/libc6_2.7-18_i386.deb) ...
Checking for services that may need to be restarted...
Checking init scripts...
WARNING: POSIX threads library NPTL requires kernel version
2.6.8 or later. If you use a kernel 2.4, please upgrade it
before installing glibc.

The installation of a 2.6 kernel _could_ ask you to install a new libc
first, this is NOT a bug, and should *NOT* be reported. In that case,
please add etch sources to your /etc/apt/sources.list and run:
apt-get install -t etch linux-image-2.6
Then reboot into this new kernel, and proceed with your upgrade
dpkg: error processing /var/cache/apt/archives/libc6_2.7-18_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.7-18_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

alpha:/usr/bin# cat /etc/*version*
4.0
alpha:/usr/bin# uname -a
Linux alpha 2.6.3-1-386 #2 Tue Feb 24 20:20:23 EST 2004 i686 GNU/Linux


/var/log/dpkg.log:: (many of these!)
2009-03-29 08:27:34 upgrade libc6 2.3.6.ds1-13etch9+b1 2.7-18
2009-03-29 08:27:34 status half-configured libc6 2.3.6.ds1-13etch9+b1
2009-03-29 08:27:34 status unpacked libc6 2.3.6.ds1-13etch9+b1
2009-03-29 08:27:34 status half-installed libc6 2.3.6.ds1-13etch9+b1
2009-03-29 08:27:41 status unpacked libc6 2.3.6.ds1-13etch9+b1
2009-03-29 08:27:43 status installed libc6 2.3.6.ds1-13etch9+b1

AlucardZero 03-29-2009 10:55 PM

What is the contents of /etc/apt/sources.list?

guthrie 03-29-2009 11:33 PM

I used stable to try the upgrade, and then (now) have reverted to etch.

For upgrade (as above details listed)
deb http://ftp.us.debian.org/debian stable main non-free contrib
deb-src http://ftp.us.debian.org/debian stable main contrib non-free
deb-src http://ftp.us.debian.org/debian etch main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free
deb-src http://security.debian.org stable/updates main contrib non-free

Now to fall-back to stable usage: (apt-does work, no errors unless trying to upgrade)

deb http://ftp.us.debian.org/debian etch main non-free contrib
deb-src http://ftp.us.debian.org/debian etch main contrib non-free
deb http://security.debian.org etch/updates main contrib non-free
deb-src http://security.debian.org etch/updates main contrib non-free

AlucardZero 03-30-2009 09:36 AM

Ok.. that looks OK

Not sure unfortunately. I can say that you don't want a -486 kernel unless you actually have a 486 processor. Try -686.

guthrie 03-30-2009 11:07 AM

apt-upgrade problems
 
"I can say that you don't want a -486 kernel unless you actually have a 486 processor. Try -686."

-- Oops, yep - silly of me!
I'll try it again, see if that was important.

-- Nope - same result and situation.
dpkg: error processing /var/cache/apt/archives
/libc6_2.7-18_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.7-18_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Thanks.

farslayer 03-30-2009 03:00 PM

Looks like that deb is possibly corrupt...

I would remove that file and try again.. it will automatically re-download the file

rm /var/cache/apt/archives/libc6_2.7-18_i386.deb

guthrie 03-30-2009 04:34 PM

OK, will try it.

Won't apt-get clean do the same thing?
[I think yes].

I had tried this before, but will again.

How can I get more info on the dpkg errors?
Does it keep a log somewhere?
subprocess pre-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

-----------------------------------------------------
Results:: *Nope.
apt-get clean
apt-get update
apt-get install apt aptitude dpkg
.........
Preparing to replace libc6 2.3.6.ds1-13etch9+b1 (using .../archives/libc6_2.7-18_i386.deb) ...
Checking for services that may need to be restarted...
Checking init scripts...
WARNING: POSIX threads library NPTL requires kernel version
2.6.8 or later. If you use a kernel 2.4, please upgrade it
before installing glibc.

The installation of a 2.6 kernel _could_ ask you to install a new libc
first, this is NOT a bug, and should *NOT* be reported. In that case,
please add etch sources to your /etc/apt/sources.list and run:
apt-get install -t etch linux-image-2.6
Then reboot into this new kernel, and proceed with your upgrade
dpkg: error processing /var/cache/apt/archives/libc6_2.7-18_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.7-18_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
-----------------------------------------------------------
apt-get install -t etch linux-image-2.6.26-1-686
Preparing to replace libc6 2.3.6.ds1-13etch9+b1 (using .../archives/libc6_2.7-18_i386.deb) ...
Checking for services that may need to be restarted...
Checking init scripts...
WARNING: POSIX threads library NPTL requires kernel version
2.6.8 or later. If you use a kernel 2.4, please upgrade it
before installing glibc.

The installation of a 2.6 kernel _could_ ask you to install a new libc
first, this is NOT a bug, and should *NOT* be reported. In that case,
please add etch sources to your /etc/apt/sources.list and run:
apt-get install -t etch linux-image-2.6
Then reboot into this new kernel, and proceed with your upgrade
dpkg: error processing /var/cache/apt/archives/libc6_2.7-18_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.7-18_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
-----------------------------------------------------------


Greg


All times are GMT -5. The time now is 10:46 PM.