做套件更新時出現錯誤
# pacman -Syu
(28/28) checking for file conflicts                       [##############################] 100%
error: failed to commit transaction (conflicting files)
/sbin/ exists in both ‘bash’ and ‘filesystem’
/lib/ exists in both ‘libldap’ and ‘filesystem’
/lib/ exists in both ‘krb5’ and ‘filesystem’[@more@]
在網路上搜尋了一下,找到了下面這一篇:
arch linux – Pacman -Syu fails `/bin exists in filesystem` – Unix & Linux Stack Exchange
先不更新 filesystem 及 bash 套件
# pacman -Syu –ignore filesystem,bash
更新 bash 套件
# pacman -S bash
resolving dependencies…
looking for inter-conflicts…
Packages (1): bash-4.3.030-1
Total Installed Size:   6.38 MiB
Net Upgrade Size:       0.00 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                            [##############################] 100%
(1/1) checking package integrity                          [##############################] 100%
(1/1) loading package files                               [##############################] 100%
(1/1) checking for file conflicts                         [##############################] 100%
(1/1) checking available disk space                       [##############################] 100%
(1/1) upgrading bash                                      [##############################] 100%
warning: directory permissions differ on /etc/
filesystem: 775  package: 755
似乎是 /etc 目錄權限有問題,不能更新
檢查 /etc 目錄權限,目錄權限為 775
# ls -ld /etc
drwxrwxr-x 61 1001 1001 4096 Oct 31 11:04 /etc
更改 /etc 目錄權限為 755
# chmod 755 /etc
/etc 目錄權限已更改為 755
# ls -ld /etc
drwxr-xr-x 61 1001 1001 4096 Oct 31 11:04 /etc
再更新一次 bash,就能正常更新了
# pacman -S bash
warning: bash-4.3.030-1 is up to date — reinstalling
resolving dependencies…
looking for inter-conflicts…
Packages (1): bash-4.3.030-1
Total Installed Size:   6.38 MiB
Net Upgrade Size:       0.00 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                            [##############################] 100%
(1/1) checking package integrity                          [##############################] 100%
(1/1) loading package files                               [##############################] 100%
(1/1) checking for file conflicts                         [##############################] 100%
(1/1) checking available disk space                       [##############################] 100%
(1/1) reinstalling bash                                   [##############################] 100%
更新剩下的 filesystem
# pacman -Su
