下载的包不完整导致pacman 更新出错:failed to commit transaction (invalid or corrupted package)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[root@huangye etc]# pacman -Su
:: Starting full system upgrade...
resolving dependencies...
warning: dependency cycle detected:
warning: util-linux will be installed before its udev dependency
looking for inter-conflicts...

Targets (22): bluez-4.99-2  chromium-18.0.1025.151-1  dhcpcd-5.5.6-1
              filesystem-2012.2-4  git-1.7.10-1  gnutls-3.0.18-1  kmod-7-2
              libgpod-0.8.2-4  libmtp-1.1.2-2  libpng-1.5.10-1
              libraw-0.14.6-1  linux-3.2.14-1  linux-headers-3.2.14-1
              lm_sensors-3.3.2-2  mkinitcpio-0.8.6-2  pcmciautils-018-4
              syslog-ng-3.3.4-5  system-config-printer-common-1.3.9-2
              tzdata-2012c-1  udev-181-9  udisks-1.0.4-3
              util-linux-2.21.1-2

Total Installed Size:   248.05 MiB
Net Upgrade Size:       -1.19 MiB

Proceed with installation? [Y/n] y
(22/22) checking package integrity                 [###################] 100%
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.
[root@huangye etc]#

疑是下载的包不完整,于是:

1
2
3
4
5
6
7
8
9
10
11
[root@huangye pkg]# cd /var/cache/pacman/pkg
[root@huangye pkg]# ls *.part*
package-query-1.0.1-1-i686.pkg.tar.xz.part.st
util-linux-2.21.1-2-i686.pkg.tar.xz.part
util-linux-2.21.1-2-i686.pkg.tar.xz.part.st
yaourt-1.0.1-1-any.pkg.tar.xz.part.st
[root@huangye pkg]#


[root@huangye pkg]# rm *.part
[root@huangye pkg]# rm *.part.st

再Syu 一下,OK了。

发现一条用于查看所有已经安装包的命令:

1
comm -23 <(pacman -Qeq|sort) <(pacman -Qmq|sort) > pkglist

文档:
Pacman Tips https://wiki.archlinux.org/index.php/Pacman_Tips
https://wiki.archlinux.org/index.php/Pacman

更多
One Response Post a comment

Leave a Reply

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS