+ -
当前位置:首页 → 问答吧 → 升级unstable出错,是不是服务器的关系啊

升级unstable出错,是不是服务器的关系啊

时间:2003-08-17

来源:互联网

昨天我把自己的Debian系统升级到了unstable
我的sources.list是
deb http://debian.cn99.com/debian unstable main contrib non-free
deb http://debian.cn99.com/debian-non-US unstable/non-US main contrib non-free

deb-src http://debian.cn99.com/debian unstable main contrib non-free
deb-src http://debian.cn99.com/debian-non-US unstable/non-US main contrib non-free
也升级了成功,而且还装上了kde3.1.3感觉还行。
出于高兴,而且感觉昨天太乱了。所以今天准备在重新安装一遍。
先把基系统安装好了,然后pppoeconf上去ping了一下debian.cn99.com不错,才120。
所以apt-get update也没有问题,因为已经很熟了呀!接着就是
apt-get dist-upgrade
......26M(也不大)
按下了y速度达到了200K。
很快就下载好了,然后就是安装了。到了
setting up netbase(4.11)
………………(省略)
………………(省略)
installing new version of config file /etc/protocols就停在了这里。
我怀疑中间我有没有弄错,所以我就在安装了一次基系统,结果还是到这里就不行了。然后我就按了ctrl+c结束了他,在连一变
apt-get dist-upgrade
因为刚才已经是下载好了,所以就开始安装了,前面那些安装成功的就不用安装了对吧!所以一开始就到了installing new version of config file /etc/protocols。。但每次都是在这里所以我感觉到纳闷。这个到底是什么问题啊!因为我昨天安装的时候还是好好的哦!所以想求助一下。在线等。。。。。。。 :(

作者: hoby   发布时间: 2003-08-17

果然和我的一模一样.同病相怜啊.
我以为是加载模块出错.modconf后还是不行.

作者: 0100   发布时间: 2003-08-17

换个镜像了

作者: llcspring   发布时间: 2003-08-17

应该不是吧!因为我昨天安装也是这样安装的哦!却没有问题哦!

作者: hoby   发布时间: 2003-08-17

我又用http://mirrors.geekbone.org/
在安装了一次,结果还是到了那里就不行。有没有办法去避免这个啊!

作者: hoby   发布时间: 2003-08-18

it′s netbase′s bug
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=205759

two solutions:
1. hold netbase at 4.10
The maintainer repacked an 4.12 already.
Probably, It will appear on ftp tomorrow
2. add /etc/hosts before ; in /var/lib/dpkg/info/netbase.postinst line 40
中文翻译:在文件/var/lib/dpkg/info/netbase.postinst的第四十行的分号前加上 /etc/hosts

作者: carlos   发布时间: 2003-08-18

谢谢。您的速度真的很快。但我现在已经用昨天的文件给安装上了。

作者: hoby   发布时间: 2003-08-18

象他这样说的做应该也不会有什么问题吧!我今天早上升级了一下,结果因为还没有更新啊!所以又停在了那里哈哈。
if [ -f /etc/hosts ] && ! grep -q "ip6-localhost"; then

should be

if [ -f /etc/hosts ] && ! grep -q "ip6-localhost" /etc/hosts; then

作者: hoby   发布时间: 2003-08-18

4.13 now... fixed

作者: carlos   发布时间: 2003-08-18

我用了你的方法安装了一次,(就是用8月17号)的资料。结果安装是成功了,但在最后一行总说出错哦!
包错的是dpkg

作者: hoby   发布时间: 2003-08-18

我看了看http://ftp.debian.org
这里的还没有更新哦!能推荐一个地方吗? 我现在对debian系统是充满了兴奋和好奇。哈哈

作者: hoby   发布时间: 2003-08-18

我就是从ftp.debian.org更新的...

作者: carlos   发布时间: 2003-08-18

但感觉速度有点慢,而且从日期上看是17号的哦!

作者: hoby   发布时间: 2003-08-18

有没有人试过了debian.cn99.com升级到unstable啊!如果已经这个问题不存在的就通知一声啊!

作者: hoby   发布时间: 2003-08-18

http://ftp.debian.org 速度慢让我受不了!所以我还是用debian.cn99.com安装了一次.用carls兄弟教的办法.但还是出了问题.下面是安装经历.
-------------------------------------------------------
刚下载好26M的升级包,察看netbase.postinst内容是
-----------------------------------
#!/bin/sh
# post install script for the Debian GNU/Linux netbase package

set -e

if [ ! -e /usr/share/debconf/confmodule ]; then
echo "netbase requires debconf to install."
exit 1
fi

if [ "$1" = "configure" ]; then
. /usr/share/debconf/confmodule
fi

if [ "$1" = "configure" -a "$2" ] && dpkg --compare-versions $2 lt 3.11-2; then
if /usr/bin/rpcinfo -u localhost portmapper >/dev/null 2>&1; then
# portmapper's still running. stop it.

if [ -x /bin/fuser ]; then
PID=`/bin/fuser -n tcp sunrpc | sed 's/^.*: *//'`
fi

if [ "$PID" ]; then
if [ ! -f /var/run/portmap.upgrade-state ]; then
echo >&2 "Remembering old rpc services..."
pmap_dump >/var/run/portmap.upgrade-state
fi
echo >&2 -n "Killing portmapper"
kill $PID
echo >&2 "."
fi
fi
fi

if [ "$1" = "configure" ]; then
# Get answers to questions
db_get netbase/ipv6-hosts; ADD_IPV6_HOSTS="$RET"

db_get netbase/spoofprot/pre-2.2-ip; LOCAL_IPS="$RET"
db_get netbase/spoofprot/pre-2.2-interfaces; LOCAL_IFACES="$RET"

# Apply answers where applicable
if [ -f /etc/hosts ] && ! grep "ip6-localhost" /etc/hosts >/dev/null; then
if [ "$ADD_IPV6_HOSTS" = "true" ]; then
echo -n "Adding IPv6 hostnames..."
cat >>/etc/hosts <<EOF

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
EOF
echo "done."
fi
fi

if [ ! -e /etc/network/spoof-protect ]; then
cat >/etc/network/spoof-protect <<EOF
# default spoof protection configuration
#
# this is only necessary for pre-2.2 kernels.
# (it can be determined automatically under 2.2.x)

EOF
echo >>/etc/network/spoof-protect "LOCAL_IPS=\"$LOCAL_IPS\""
echo >>/etc/network/spoof-protect "LOCAL_IFACES=\"$LOCAL_IFACES\""
chmod 644 /etc/network/spoof-protect
fi

if [ "$2" ] && dpkg --compare-versions "$2" lt "3.17-1"; then
if [ -e /etc/init.d/network ]; then
cat >> /etc/init.d/network << EOF

# (added automatically by netbase upgrade)
#
# In new Debian installations, this file is deprecated in favour of
# the ifup/ifdown commands (invoked from /etc/init.d/networking), which
# can be configured from the file /etc/network/interfaces.
#
# If you are receiving SIOCADDRT errors, they can be avoided by adding
# a netmask and interface to your "route add -net" lines. eg,
# route add -net 127.0.0.0
# becomes:
# route add -net 127.0.0.0 netmask 255.0.0.0 lo
#
# Alternatively, these lines can simply be deleted if you don't use 2.0.x
# series kernels.
EOF
fi
fi

if [ -e /etc/init.d/netbase ]; then
mv /etc/init.d/netbase /etc/init.d/netbase.old
fi

if [ "$2" ] && dpkg --compare-versions "$2" lt "3.18-1"; then
# only do this for people who were running unstable
if dpkg --compare-versions "$2" ge 3.16-1; then
echo >&2 "BUGFIX: Resetting runlevels at which /etc/init.d/networking is run."
update-rc.d -f networking remove >/dev/null 2>&1
fi
fi

if [ $2 ] && dpkg --compare-versions $2 lt 3.18-1; then
update-rc.d -f netbase remove >/dev/null 2>&1
fi

update-rc.d networking start 40 S . start 35 0 6 . >/dev/null
fi

# Automatically added by dh_installdocs
if [ "$1" = "configure" ]; then
if [ -d /usr/doc -a ! -e /usr/doc/netbase -a -d /usr/share/doc/netbase ]; then
ln -sf ../share/doc/netbase /usr/doc/netbase
fi
fi
# End automatically added section


# shouldn't be necessary? but without it the postinst just hangs on dpkg -i :(
#
# do i have to do this right at the end, or can i do it earlier, for that
# matter?
#
# i may be meant to redirect 3>&1 or something equally weird here :-/
# maybe this isn't necessary anymore (since there shouldn't be any daemons
# in this postinst anymore), but who knows?
#
if [ "$1" = "configure" ]; then
db_stop
fi
------------------
然后是升级系统后,还没有配置LILO是的这个文件内容
-------------------------------------------------
#!/bin/sh -e

if [ ! -e /usr/share/debconf/confmodule ]; then
echo "netbase requires debconf to install."
exit 1
fi

if [ "$1" = "configure" ]; then
. /usr/share/debconf/confmodule
fi

remove_old_files() {
rm -f /etc/cron.daily/netbase /etc/network/spoof-protect
}

kill_portmapper() {
if [ "$2" ] && dpkg --compare-versions $2 lt "3.11-2"; then
if /usr/bin/rpcinfo -u localhost portmapper >/dev/null 2>&1; then
# portmapper's still running. stop it.

if [ -x /bin/fuser ]; then
PID=$(/bin/fuser -n tcp sunrpc | sed 's/^.*: *//')
fi

if [ "$PID" ]; then
if [ ! -f /var/run/portmap.upgrade-state ]; then
echo >&2 "Remembering old rpc services... "
pmap_dump >/var/run/portmap.upgrade-state
echo >&2 "done."
fi
echo >&2 -n "Killing portmapper... "
kill $PID
echo >&2 "done."
fi
fi
fi
}

update_hosts_file() {
if [ -f /etc/hosts ] && ! grep -q "ip6-localhost" /etc/hosts ; then
cat >>/etc/hosts <<-EOF

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
EOF
fi
}

update_initd_networks() {
if [ "$2" ] && dpkg --compare-versions "$2" lt "3.17-1"; then
if [ -e /etc/init.d/network ]; then
cat >> /etc/init.d/network <<EOF

# (added automatically by netbase upgrade)
#
# In new Debian installations, this file is deprecated in favour of
# the ifup/ifdown commands (invoked from /etc/init.d/networking), which
# can be configured from the file /etc/network/interfaces.
#
# If you are receiving SIOCADDRT errors, they can be avoided by adding
# a netmask and interface to your "route add -net" lines. eg,
# route add -net 127.0.0.0
# becomes:
# route add -net 127.0.0.0 netmask 255.0.0.0 lo
#
# Alternatively, these lines can simply be deleted if you don't use 2.0.x
# series kernels.
EOF
fi
fi
}

fix_old_initscript() {
if [ -e /etc/init.d/netbase ]; then
mv /etc/init.d/netbase /etc/init.d/netbase.old
fi

if [ "$2" ] && dpkg --compare-versions "$2" lt "3.18-1"; then
# only do this for people who were running unstable
if dpkg --compare-versions "$2" ge "3.16-1"; then
echo >&2 "BUGFIX: Resetting runlevels at which /etc/init.d/networking is run."
update-rc.d -f networking remove > /dev/null 2>&1
fi

update-rc.d -f netbase remove > /dev/null 2>&1
fi
}

update_rc() {
update-rc.d networking start 40 S . start 35 0 6 . > /dev/null
}

case "$1" in
configure)
remove_old_files
kill_portmapper "$@"
update_hosts_file
update_initd_networks "$@"
fix_old_initscript "$@"
update_rc
;;

abort-upgrade|abort-remove|abort-deconfigure)
;;

*)
echo "postinst called with unknown argument '$1'" >&2
exit 1
;;
esac



# shouldn't be necessary? but without it the postinst just hangs on dpkg -i :(
#
# do i have to do this right at the end, or can i do it earlier, for that
# matter?
#
# i may be meant to redirect 3>&1 or something equally weird here :-/
# maybe this isn't necessary anymore (since there shouldn't be any daemons
# in this postinst anymore), but who knows?
#
if [ "$1" = "configure" ]; then
db_stop
fi
------------------------
到了执行netbase时候,很顺利的下去,结果是
----------------
E:sub_process /usr/bin/dpkg returned an error code(1)
==============================================
大家看这个结果是如何引起的呢!上面的/etc/hosts是我加进去以后才能执行的部分.还有我真的不想看到这个错误,如果要修补这个E的话,那要如何做呢!

作者: hoby   发布时间: 2003-08-20

debian.cn99.com真是不付责任... 更新如此之慢...

搬动下载 http://ftp.debian.org/debian/pool/ma...e_4.13_all.deb
然后用 dpkg -i netbase_4.13_all.deb 进行安装...

你可以试试 ftp.jp.debian.org ,速度应该还行,更新频率也高

作者: carlos   发布时间: 2003-08-20

谢谢.我马上先去测试一下了
ftp.jp.debian.org
这个我下载只有20K不到,而debian.cn99.com我能达到210K.所以还是用这个速度快点啊!

作者: hoby   发布时间: 2003-08-20

随便你吧....
我的小猫,5k/s,...

作者: carlos   发布时间: 2003-08-20

哦!我说的话是无意的.请不要见怪.
谢谢你,因为按你的方法我已经成功了...

作者: hoby   发布时间: 2003-08-20

热门下载

更多