pacman -Syuu:错误:检索文件失败(“操作太慢”和“SSL 证书问题”)
Posted
技术标签:
【中文标题】pacman -Syuu:错误:检索文件失败(“操作太慢”和“SSL 证书问题”)【英文标题】:pacman -Syuu : error: failed retrieving file ("Operation too slow" and "SSL certificate problem") 【发布时间】:2019-08-04 03:26:45 【问题描述】:我在尝试使用pacman -Syuu
在Win 10 下升级我的Portable Msys2 时遇到问题,详情如下。
我以前也这样做过,没有问题。
问题和解决方案可能是什么?
$ pacman -Syuu
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
msys is up to date
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
warning: grep: downgrading from version 3.1-1 to version 3.0-2
warning: libgc: downgrading from version 8.0.0-1 to version 7.6.8-1
warning: mingw-w64-x86_64-binutils: downgrading from version 2.31.1-2 to version 2.30-5
:: Replace mingw-w64-x86_64-minizip with mingw64/mingw-w64-x86_64-zlib? [Y/n] y
:: Replace mingw-w64-x86_64-vulkan with mingw64/mingw-w64-x86_64-vulkan-loader? [Y/n] y
resolving dependencies...
looking for conflicting packages...
Packages (217) autogen-5.18.16-1 bison-3.3.2-1 brotli-1.0.7-1 ca-certificates-20180409-1 cmake-3.13.2-1 curl-7.64.0-2 diffutils-3.7-1 doxygen-1.8.15-1
...
Total Download Size: 1400.65 MiB
Total Installed Size: 9648.15 MiB
Net Upgrade Size: 261.06 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
error: failed retrieving file 'mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz' from repo.msys2.org : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
error: failed retrieving file 'mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz' from sourceforge.net : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz' from www2.futureware.at : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
error: failed retrieving file 'mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz' from mirror.yandex.ru : SSL certificate problem: unable to get local issuer certificate
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.
根据this,我的回购配置似乎没问题:
$ pacman-conf.exe
[options]
RootDir = /
DBPath = /var/lib/pacman/
CacheDir = /var/cache/pacman/pkg/
HookDir = /etc/pacman.d/hooks/
GPGDir = /etc/pacman.d/gnupg/
LogFile = /var/log/pacman.log
HoldPkg = pacman
Architecture = i686
CheckSpace
UseDelta = 0.000000
CleanMethod = KeepInstalled
SigLevel = PackageRequired
SigLevel = PackageTrustedOnly
SigLevel = DatabaseOptional
SigLevel = DatabaseTrustedOnly
LocalFileSigLevel = PackageOptional
LocalFileSigLevel = PackageTrustedOnly
[mingw32]
Usage = All
Server = http://repo.msys2.org/mingw/i686/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/
Server = https://mirror.yandex.ru/mirrors/msys2/mingw/i686/
[mingw64]
Usage = All
Server = http://repo.msys2.org/mingw/x86_64/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/x86_64/
Server = https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/
[msys]
Usage = All
Server = http://repo.msys2.org/msys/i686/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/i686/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/msys/i686/
Server = https://mirror.yandex.ru/mirrors/msys2/msys/i686/
相关:
https://github.com/msys2/MINGW-packages/issues/1887
https://bbs.archlinux.org/viewtopic.php?id=199693
https://sourceforge.net/p/msys2/discussion/general/thread/8427aab0/
编辑 在评论中建议我执行
pacman-mirrors ...
我的系统中似乎没有这样的可执行文件(脚本、别名等)
另一方面,我似乎已经拥有pacman-mirrors
,并且它不提供任何可执行文件(至少在 msys2 中)。 这是正确的吗?
$ updatedb
$ locate pacman-mirrors
/var/cache/pacman/pkg/pacman-mirrors-20180604-2-any.pkg.tar.xz
/var/lib/pacman/local/pacman-mirrors-20180604-2
/var/lib/pacman/local/pacman-mirrors-20180604-2/desc
/var/lib/pacman/local/pacman-mirrors-20180604-2/files
/var/lib/pacman/local/pacman-mirrors-20180604-2/mtree
$ pacman -Ql pacman-mirrors
pacman-mirrors /etc/
pacman-mirrors /etc/pacman.d/
pacman-mirrors /etc/pacman.d/mirrorlist.mingw32
pacman-mirrors /etc/pacman.d/mirrorlist.mingw64
pacman-mirrors /etc/pacman.d/mirrorlist.msys
$ pacman --needed -S bash pacman pacman-mirrors msys2-runtime
warning: bash-4.4.023-1 is up to date -- skipping
warning: pacman-5.1.2-2 is up to date -- skipping
warning: pacman-mirrors-20180604-2 is up to date -- skipping
warning: msys2-runtime-2.11.2-1 is up to date -- skipping
【问题讨论】:
您是否尝试过再次加载证书 - sudo pacman -U /var/cache/pacman/pkg/ca-certificates* 也可能是镜子的问题?你可以改变镜像 - sudo pacman-mirrors -f5 && sudo pacman -Syyu 一些命令可能有帮助。 1.pacman-key --init
2.pacman-key --populate
.
@jimmy8ball - pacman -U ... 没有帮助。
@Biswapriyo - 我尝试了这两个命令,我得到了相同的结果。
【参考方案1】:
您可以使用参数--disable-download-timeout
禁用 pacman 的超时。那你应该可以下载了
http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz
它被描述为on the man-page for pacman。
另外--gpgdir
指定 GnuPG 用来验证包签名的文件目录可能很有用。
另外你可以考虑使用参数--noconfirm
绕过任何和所有“你确定吗?”消息。
关于证书我不确定,可能本地路径配置不正确。尽管如此,您有两个域,仍然由http
提供服务。
在浏览器中,下载工作顺便说一句。它刚刚完成,屏幕截图仍然显示正在下载:
【讨论】:
添加--disable-download-timeout
就足够了。【参考方案2】:
我也遇到过这个问题,但我找到了解决方案:打开 Add or Remove Softwares 并转到 Preferences,然后将您的官方存储库更改为 Canada 然后刷新镜像列表
现在可以用了
【讨论】:
以上是关于pacman -Syuu:错误:检索文件失败(“操作太慢”和“SSL 证书问题”)的主要内容,如果未能解决你的问题,请参考以下文章
csharp 使用XAML在C#中绘制PacMan风格的PacMan