FreeBSD 8.3なマシンで、portsを使っているときの話なのですが、
# uname -r
8.3-RELEASE-p3
最近、「tar: Unrecognized archive format」というエラーを時々見かけるようになりました。たとえば
# portupgrade -p png-1.5.15
---> Upgrading 'png-1.5.15' to 'png-1.5.16' (graphics/png)
---> Building '/usr/ports/graphics/png'
===> Cleaning for png-1.5.16
===> Found saved configuration for png-1.5.14
===> Fetching all distfiles required by png-1.5.16 for building
===> Extracting for png-1.5.16
=> SHA256 Checksum OK for libpng-1.5.16.tar.xz.
=> SHA256 Checksum OK for libpng-1.5.16-apng.patch.gz.
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
*** Error code 1
Stop in /usr/ports/graphics/png.
*** Error code 1
Stop in /usr/ports/graphics/png.
「tar: Unrecognized archive format」ということなので、アーカイブのファイル形式が「.xz」だからでるエラーでしょうかね。
とりあえず、/usr/bin/tarの代わりに、/usr/ports/archivers/gtar/でインストールした、/usr/local/bin/gtar を使わせてしまえばOKっぽいです。
# env TAR=gtar portupgrade -p png-1.5.15
---> Upgrading 'png-1.5.15' to 'png-1.5.16' (graphics/png)
---> Building '/usr/ports/graphics/png'
===> Cleaning for png-1.5.16
===> Found saved configuration for png-1.5.14
===> Fetching all distfiles required by png-1.5.16 for building
===> Extracting for png-1.5.16
=> SHA256 Checksum OK for libpng-1.5.16.tar.xz.
=> SHA256 Checksum OK for libpng-1.5.16-apng.patch.gz.
/bin/cp /usr/ports/distfiles/libpng-1.5.16-apng.patch.gz /ports.work.d/usr/ports/graphics/png/work/libpng-1.5.16/
/usr/bin/gzip -nf -9 -d /ports.work.d/usr/ports/graphics/png/work/libpng-1.5.16/libpng-1.5.16-apng.patch.gz
===> Patching for png-1.5.16
(以下省略)
portupgradeではなく、makeしたときも、同じエラーになってしまうので、
# make
===> Found saved configuration for png-1.5.14
===> Fetching all distfiles required by png-1.5.16 for building
===> Extracting for png-1.5.16
=> SHA256 Checksum OK for libpng-1.5.16.tar.xz.
=> SHA256 Checksum OK for libpng-1.5.16-apng.patch.gz.
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
*** Error code 1
これは、make TAR=gtarというやりかたもあったり。
# make TAR=gtar
===> Found saved configuration for png-1.5.14
===> Fetching all distfiles required by png-1.5.16 for building
===> Extracting for png-1.5.16
=> SHA256 Checksum OK for libpng-1.5.16.tar.xz.
=> SHA256 Checksum OK for libpng-1.5.16-apng.patch.gz.
/bin/cp /usr/ports/distfiles/libpng-1.5.16-apng.patch.gz /ports.work.d/usr/ports/graphics/png/work/libpng-1.5.16/
/usr/bin/gzip -nf -9 -d /ports.work.d/usr/ports/graphics/png/work/libpng-1.5.16/libpng-1.5.16-apng.patch.gz
===> Patching for png-1.5.16
ちなみにFreeBSD 9系は、とくに問題ないようです。
☆
あとで
make -d all とかやって調べてみたのですが
gtar -tf FILE.tar.xz はOKで、
gtar -ztf FILE.tar.xz はerror
gtar -jtf FILE.tar.xz もerrorになるようです。へ~、よけいなオプションは付けないほうがいいのですか
0 件のコメント:
コメントを投稿