pacman修復(fù)

如果 pacman完全壞掉不能使用,需要手動(dòng)下載或構(gòu)建需要的軟件包(openssl, libarchivepacman) 并解壓到根目錄。pacman 會(huì)和默認(rèn)配置文件一起恢復(fù)。之后,用 pacman 重新安裝這些軟件包以保證數(shù)據(jù)庫(kù)的完整性。
截圖_2019-10-15_08-25-13.png

截圖_2019-10-15_08-36-02.png
在根目錄解壓下載的三個(gè)壓縮包

例如:openssl

tar -xJvf openssl-1.1.1.d-1-x86_64.pkg.tar.xz
執(zhí)行:
pacman --version
如果出現(xiàn)報(bào)錯(cuò):
pacman: error while loading shared libraries: libgpgme.so.11: cannot open shared object file: No such file or directory

代表pacman缺少libgpgme.so.11文件

https://www.archlinux.org/packages/core/x86_64/gpgme/上面下載gpgme

安裝gpgme

tar -xvJf gpgme-1.3.1-2-i686.pkg.tar.xz -C / --exclude .PKGINFO --exclude .INSTALL
如果出現(xiàn)報(bào)錯(cuò):
pacman: error while loading shared libraries: libassuan.so.0: cannot open shared object file: No such file or directory
https://www.archlinux.org/packages/core/x86_64/libassuan/上面下載libassuan

安裝libassuan

tar -xvJf libassuan-2.5.3-1-i686.pkg.tar.xz -C / --exclude .PKGINFO --exclude .INSTALL

之后看看缺什么再補(bǔ)什么
參考鏈接:https://bbs.archlinux.org/viewtopic.php?id=95007&p=2

這時(shí)候需要重置密鑰
pacman-key --init
==> 錯(cuò)誤: 無(wú)法找到所需的 gpg 二進(jìn)制文件以進(jìn)行所有 pacman-key 操作。

https://www.archlinux.org/packages/core/x86_64/gnupg/下載gnupg
安裝

tar -xvJf gnupg-2.2.17-2-x86_64.pkg.tar.xz -C / --exclude .PKGINFO --exclude .INSTALL

再執(zhí)行

pacman-key --init
gpg: can't connect to the agent: IPC connect call failed
gpg-agent --daemon
gpg-agent: error while loading shared libraries: libnpth.so.0: cannot open shared object file: No such file or directory

https://www.archlinux.org/packages/core/x86_64/npth/下載npth安裝
在執(zhí)行

gpg-agent --daemon
pacman-key --init

參考鏈接:https://www.archlinuxcn.org/gnupg-2-1-and-the-pacman-keyring/

pacman-key --populate archlinux

另一種方法就是禁止密鑰認(rèn)證

vim /etc/pacman.conf

修改SigLevel 選項(xiàng)

SigLevel = Never
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容