嘗試升級時處理存檔時發生錯誤

嘗試升級時處理存檔時發生錯誤

運行命令時出現以下錯誤sudo apt upgrade

dpkg: error processing archive /var/cache/apt/archives/wireless-regdb_2018.05.09-0ubuntu1~16.04.1_all.deb (--unpack):
 trying to overwrite '/lib/crda/pubkeys/sforshee.key.pub.pem', which is also in package crda 3.18-0ubuntu1
Errors were encountered while processing:
 /var/cache/apt/archives/wireless-regdb_2018.05.09-0ubuntu1~16.04.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

你有兩種方法:

1)乾淨的方法是刪除衝突的包包:

sudo apt remove crda
sudo apt upgrade

2)不乾淨的方式是強制覆蓋:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/wireless-regdb_2018.05.09-0ubuntu1~16.04.1_all.deb
sudo apt upgrade

如果有幫助的話,就按個贊https://askubuntu.com/a/176132/486734https://askubuntu.com/a/433510/486734,一旦你有足夠的聲譽。

相關內容