2013年12月24日火曜日

obsA7-002 perl-baseの更新

初回のaptitude safe-upgrade で perl-base が更新できなかったときの回避。この処置が正しいかは怪しい。

1.upgradeでのエラーの症状

root@obsa7:/usr/bin# aptitude update
root@obsa7:/usr/bin# aptitude safe-upgrade
The following packages will be upgraded:
  apt apt-utils dmsetup gnupg gpgv libapt-inst1.5 libapt-pkg4.12
  libdevmapper1.02.1 libgcrypt11 libgssapi-krb5-2 libk5crypto3 libkrb5-3
  libkrb5support0 perl-base sysv-rc sysvinit sysvinit-utils tzdata
The following packages are RECOMMENDED but will NOT be installed:
  gnupg-curl krb5-locales libldap-2.4-2
18 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/8148 kB of archives. After unpacking 224 kB will be freed.
Do you want to continue? [Y/n/?]
Preconfiguring packages ...
(Reading database ... 9396 files and directories currently installed.)
Preparing to replace perl-base 5.14.2-21 (using .../perl-base_5.14.2-21+deb7u1_armel.deb) ...
Unpacking replacement perl-base ...
dpkg: error processing /var/cache/apt/archives/perl-base_5.14.2-21+deb7u1_armel.deb (--unpack):
 unable to make backup link of './usr/bin/perl5.14.2'
  before installing new version: No such file or directory
  >>>(注意1)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/perl-base_5.14.2-21+deb7u1_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:

root@obsa7:/usr/bin#
(注意1): No such file or directory のエラーが出る。どうも./usr/bin/perl5.14.2が足をひっぱってそうなので、
root@obsa7:/usr/bin# ls -l perl*
-rwxr-xr-x 1 root root 9792 Apr 12  2013 perl
-rwxr-xr-x 1 root root 9792 Apr 12  2013 perl5.14.2
root@obsa7:/usr/bin# mv perl5.14.2 perl5.14.2.bak
mv: cannot move 'perl5.14.2' to 'perl5.14.2.bak': Input/output error
root@obsa7:/usr/bin# cd /.rw/usr/bin

root@obsa7:/.rw/usr/bin# mv perl5.14.2 perl5.14.2_BAK
root@obsa7:/.rw/usr/bin# cd /usr/bin

root@obsa7:/usr/bin# cp perl5.14.2_BAK perl5.14.2
root@obsa7:/usr/bin# ls -l perl*
-rwxr-xr-x 2 root root 9792 Apr 12  2013 perl
-rwxr-xr-x 1 root root 9792 Dec 24 10:10 perl5.14.2
-rwxr-xr-x 1 root root 9792 Apr 12  2013 perl5.14.2_BAK
root@obsa7:/usr/bin#

(後で_BAKを消す)
root@obsa7:/.rw/usr/bin# rm perl5.14.2_BAK
この/usr/bin/perl5.14.2が変更できなくてInput/output errorになっていると思われ、これを回避するために/.rwでリネームして/usr/binでコピーしてみた。そして、再aptitude safe-upgrade するとエラー無く通った。
root@obsa7:/usr/bin# aptitude safe-upgrade
The following packages will be upgraded:
  apt apt-utils dmsetup gnupg gpgv libapt-inst1.5 libapt-pkg4.12
  libdevmapper1.02.1 libgcrypt11 libgssapi-krb5-2 libk5crypto3 libkrb5-3
  libkrb5support0 perl-base sysv-rc sysvinit sysvinit-utils tzdata
The following packages are RECOMMENDED but will NOT be installed:
  gnupg-curl krb5-locales libldap-2.4-2
18 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/8148 kB of archives. After unpacking 224 kB will be freed.
Do you want to continue? [Y/n/?]
Preconfiguring packages ...
(Reading database ... 9396 files and directories currently installed.)
Preparing to replace perl-base 5.14.2-21 (using .../perl-base_5.14.2-21+deb7u1_armel.deb) ...
Unpacking replacement perl-base ...
Processing triggers for man-db ...
Setting up perl-base (5.14.2-21+deb7u1) ...
(Reading database ... 9396 files and directories currently installed.)
Preparing to replace sysvinit 2.88dsf-41 (using .../sysvinit_2.88dsf-41+deb7u1_armel.deb) ...
Unpacking replacement sysvinit ...
Processing triggers for man-db ...
Setting up sysvinit (2.88dsf-41+deb7u1) ...
sysvinit: restarting... done.
INIT: version 2.88 reloading
(省略)

Preparing to replace kernel-image 3.2.40-1 (using .../kernel-image_3.2.40-3_armel.deb) ...
Unpacking replacement kernel-image ...
Setting up kernel-image (3.2.40-3) ...
Load boot image to FlashROM
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
**************************************************
************
done

Current status: 1 update [-3].
root@obsa7:/usr/bin#
root@obsa7:/usr/bin# ls -l perl*
-rwxr-xr-x 2 root root 9792 Sep 30 17:56 perl
-rwxr-xr-x 2 root root 9792 Sep 30 17:56 perl5.14.2
root@obsa7:/usr/bin#
おお、kernel-imageも自動でアップデート。この時のsource-listは初期の標準のもの。
(前)
root@obsa7:~# uname -a
Linux obsa7 3.2.40 #1 Fri Sep 27 10:30:55 JST 2013 armv5tel GNU/Linux
(後)
root@obsa7:~# uname -a
Linux obsa7 3.2.40 #1 Mon Oct 21 14:10:25 JST 2013 armv5tel GNU/Linux

</etc/apt/sources.list>
deb http://ftp.plathome.co.jp/pub/debian wheezy main
deb-src http://ftp.plathome.co.jp/pub/debian wheezy main

deb http://ftp.plathome.co.jp/pub/debian wheezy-backports main
deb-src http://ftp.plathome.co.jp/pub/debian wheezy-backports main

deb http://ftp.plathome.co.jp/pub/debian-security wheezy/updates main
deb-src http://ftp.plathome.co.jp/pub/debian-security wheezy/updates main

deb http://ftp.plathome.co.jp/pub/OBSA7/debian/wheezy ./

0 件のコメント:

コメントを投稿