问题

今天在升级archlinux系统时提示:

$ yaourt -Syu
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from mirrors.zju.edu.cn : Failed to connect to mirrors.zju.edu.cn port 80: Connection refused
 core is up to date
error: failed retrieving file 'extra.db' from mirrors.zju.edu.cn : Failed to connect to mirrors.zju.edu.cn port 80: Connection refused
 extra is up to date
error: failed retrieving file 'community.db' from mirrors.zju.edu.cn : Failed to connect to mirrors.zju.edu.cn port 80: Connection refused
 community is up to date
error: failed retrieving file 'multilib.db' from mirrors.zju.edu.cn : Failed to connect to mirrors.zju.edu.cn port 80: Connection refused
 multilib is up to date
error: failed retrieving file 'archlinuxcn.db' from mirrors.zju.edu.cn : Failed to connect to mirrors.zju.edu.cn port 443: Connection refused
error: failed to update archlinuxcn (download library error)
error: failed to synchronize all databases

很明显是mirrors.zju.edu.cn的服务器出了问题

解决

编辑 /etc/pacman.conf 文件

编辑vim /etc/pacman.conf在最后将Server = https://mirrors.zju.edu.cn/archlinuxcn/$arch注释掉,并添加Include = /etc/pacman.d/archlinuxcn-mirrorlist,如下

[archlinuxcn]
#The Chinese Arch Linux communities packages.
#Server = http://repo.archlinuxcn.org/$arch
#Server = https://mirrors.zju.edu.cn/archlinuxcn/$arch
Include = /etc/pacman.d/archlinuxcn-mirrorlist

添加 archlinuxcn-mirrorlist 文件

/etc/pacman.d/目录下添加 archlinuxcn-mirrorlist文件 vim /etc/pacman.d/archlinuxcn-mirrorlist

## 上海科技大学 (上海) (ipv4, http, https)
#Server = https://mirrors-wan.geekpie.club/archlinuxcn/$arch

## 网易 (ipv4, http, https)
Server = https://mirrors.163.com/archlinux-cn/$arch

## 腾讯云 (ipv4, https)
Server = https://mirrors.cloud.tencent.com/archlinuxcn/$arch

## 重庆大学 (ipv4, http, https)
Server = https://mirrors.cqu.edu.cn/archlinuxcn/$arch

## SJTUG 软件源镜像服务 (ipv4, https)
#Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux-cn/$arch

## 莞工 GNU/Linux 协会 开源软件镜像站 (ipv4, http, https)
#Server = https://mirrors.dgut.edu.cn/archlinuxcn/$arch

## 清华大学 (ipv4, ipv6, http, https)
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

## 浙江大学 (浙江杭州) (ipv4, ipv6, http, https)
Server = https://mirrors.zju.edu.cn/archlinuxcn/$arch

## xTom (Hong Kong server) (Hong Kong) (ipv4, ipv6, http, https)
#Server = https://mirror.xtom.com.hk/archlinuxcn/$arch

## xTom (US server) (US) (ipv4, ipv6, http, https)
#Server = https://mirror.xtom.com/archlinuxcn/$arch

## xTom (Netherlands server) (Netherlands) (ipv4, ipv6, http, https)
#Server = https://mirror.xtom.nl/archlinuxcn/$arch

## Open Computing Facility, UC Berkeley (Berkeley, CA, United States) (ipv4, ipv6, http, https)
#Server = https://mirrors.ocf.berkeley.edu/archlinuxcn/$arch

再次更新

$ yaourt -Syu

更新成功