更新arch

本文提供了一套详细的ArchLinux系统更新步骤,包括同步源数据库、更新关键软件包如tzdata及pacman本身,设置pacman密钥,更新文件系统,并确保删除不必要的配置文件,最后完成整个系统的全面更新。

1.同步源数据库
pacman -Sy

2.更新tzdata
pacman -S tzdata
之后会提示:
The following packages should be upgradeed first :
pacman
Do you want to cancel the current operation
and upgrade these packages now? [Y/n]
此处一定要选择n

3.更新pacman
pacman -S pacman
//更新pacman前必须先更新tzdata,否则会出现下面的提示:
error:failed to commit transaction (conflicting files)
glibc:/usr/bin/tzselect exists in filesystem
glibc:/usr/sbin/zdump exists in filesystem
glibc:/usr/sbin/zic exists in filesystem
Errors occurred,no packages were upgraded.

4.设置pacman密钥
pacman-key --init
//该过程需要较长的时间,执行该命令后可直接执行下面的步骤

这一步时可能长时间不出结果,可以按住<Ctrl>+<Alt>+<F2>切换到另一个tty中,随便输入几个字符,越多越好。

其实 key 的产生是根据系统的熵来计算的,即系统的混乱程度,大量的I/O操作会提高系统的熵。这样就可以计算出key了。

5.更新文件系统
pacman -S filesystem --force
原文链接如下:
https://www.archlinux.org/news/filesystem-upgrade-manual-intervention-required/

6.删除/etc/profile.d/locale.sh文件
rm -f /etc/profile.d/locale.sh
原文链接如下:
https://www.archlinux.org/news/initscripts-update-manual-intervention-required/

7.更新ArchLinux
pacman -Syu
//使用pacman -Syu命令前,必须先执行第4、5步,否则会出现下面的提示:
error:failed to commit transaction (conflicting files)
filesystem:/etc/mtab exists in filesystem
initscripts:/etc/profile.d/locale.sh exists in filesystem
Errors occurred,no packages were upgraded.

转载于:https://www.cnblogs.com/healthy-tree/archive/2012/06/29/2570322.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值