问题描述
MSYS2 中运行更新命令,如下。
$ pacman -Syu
出现如下错误。
zstd-1.4.4-2-x86_64 304.7 KiB 626K/s 00:00 [#####################] 100%
错误:无法从 mirrors.tuna.tsinghua.edu.cn : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds 获取文件 'pacman-5.2.1-6-x86_64.pkg.tar.xz'
错误:无法从 repo.msys2.org : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds 获取文件 'pacman-5.2.1-6-x86_64.pkg.tar.xz'
assertion "httpc->drain_total >= data->state.drain" failed: file "http2.c", line 496, function: drain_this
Aborted (核心已转储)
如下图所示。
错误原因
还是速度太慢导致的。
解决方案
1、确认数据源是国内的。具体方法参考这个 Blog,https://blog.csdn.net/justidle/article/details/103025966。
2、删除数据锁。
rm -rf /var/lib/pacman/db.lck
3、继续更新。
pacman -Syu