卸載 Google Chrome 時出現錯誤

卸載 Google Chrome 時出現錯誤

我無法更新或解除安裝 Google Chrome。我收到此錯誤:

Setting up google-chrome-stable (36.0.1985.125-1) ...
xdg-icon-resource: size argument must be numeric
Try 'xdg-icon-resource --help' for more information.
dpkg: error processing package google-chrome-stable (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 google-chrome-stable
E: Sub-process /usr/bin/dpkg returned an error code (1)

我記得之前更改和替換了 Google Chrome 的預設圖示。我該如何解決這個問題?

答案1

根據錯誤和提及post-installation script,我想說即使安裝也沒有成功完成。您必須運行sudo dpkg --purge --force-all google-chrome-stable才能將其刪除。

編輯:運行,並在呼叫 的任何行前面gksudo gedit /var/lib/dpkg/info/google-chrome-stable.postinst新增。保存它,然後再次嘗試刪除該包。#xdg-icon-resource

答案2

對我有用的是安裝 xdg-utils 包,刪除 chrome,並在全部完成後刪除 xdg.utils 套件:

  1. 百勝安裝 xdg-utils
  2. 百勝刪除谷歌瀏覽器
  3. yum 刪除 xdg-utils

答案3

回應這裡幫助過我,

它與@saiarcot895非常相似,只是我也必須以/var/lib/dpkg/info/google-chrome-stable.prerm相同的方式進行修改。

相關內容