安装 android-ndk 的时候出现签名错误,
下面是我安装时候的 log, 和 pacman.conf 的配置,还有我安装的 keyring ,实在想不出什么原因了,求解答
已经安装的 keyring
❯ yaourt -Ss keyring | grep "install" ⏎
core/archlinux-keyring 20160402-1 [installed]
extra/gnome-keyring 1:3.20.0-1 (gnome) [installed]
extra/libgnome-keyring 3.12.0-2 [installed]
archlinuxcn/archlinuxcn-keyring 20160410-1 [installed]
pacman.conf 的配置
❯ cat /etc/pacman.conf
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#XferCommand = /usr/bin/axel -o %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
#Color
#TotalDownload
CheckSpace
#VerbosePkgLists
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
#[testing]
#Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
#[community-testing]
#Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist
[multilib]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
[archlinuxcn]
# SigLevel = Optional TrustAll
SigLevel = Optional TrustedOnly
Server = http://mirrors.ustc.edu.cn/archlinuxcn/$arch
# Server = http://mirrors.163.com/archlinuxcn/$arch
# Server = http://repo.archlinuxcn.org/$arch
安装log
❯ sudo pacman -Syu android-ndk
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
archlinuxcn is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (3) libtinfo-6-6 ncurses5-compat-libs-6.0-3 android-ndk-r11-2
Total Installed Size: 2627.33 MiB
:: Proceed with installation? [Y/n] Y
(3/3) checking keys in keyring [######################################################################] 100%
(3/3) checking package integrity [######################################################################] 100%
error: ncurses5-compat-libs: signature from "lilac (build machine) <lilac@build.archlinuxcn.org>" is invalid
:: File /var/cache/pacman/pkg/ncurses5-compat-libs-6.0-3-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.
离线
原因是这个包本来就是这样子……
本来是 lilac 在打包的,某一天 felixonmars 上传了一个同版本的包,覆盖了 lilac 的版本,但是没有签名。于是现在就会用 lilac 的签名检查 felixonmars 打的包,当然会通不过检查了……
离线
谢谢 “依云” 的回复,大概懂这个意思了,但是我把 pacman.conf 中 [archlinuxcn] 配置成 SigLevel = Optional TrustAll 试过了也不行啊。
这个是什么原因啊。
102 [archlinuxcn]
103 SigLevel = Optional TrustAll
104 #SigLevel = Optional TrustedOnly
105 Server = http://mirrors.ustc.edu.cn/archlinuxcn/$arch
106 # Server = http://mirrors.163.com/archlinuxcn/$arch
107 # Server = http://repo.archlinuxcn.org/$arch
离线
签名和软件包不匹配。你还是去网站上直接下载文件然后再安装吧。
离线
现在问题已经解决了,但具体原因还是没找到
之前安装使用的普通用户,然后用 sudo 获取 root 的权限,解释器用的是 zsh,无论怎么修改 pacman.conf 结果都是呈现这个状态
:: Proceed with installation? [Y/n] Y
(3/3) checking keys in keyring [######################################################################] 100%
(3/3) checking package integrity [######################################################################] 100%
error: ncurses5-compat-libs: signature from "lilac (build machine) <lilac@build.archlinuxcn.org>" is invalid
:: File /var/cache/pacman/pkg/ncurses5-compat-libs-6.0-3-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.
但是之后吧 pacman.conf 中的 Sigleve 设置成 Never, 然后吧其他的原中的 sigleve 注释掉,然后切换到 root 帐号,就可以跳过
3/3) checking package integrity
这个步骤了。
总之现在装上了,还有再次谢谢 “依云” 的解答。
离线