執行apt-get update 時 /var/lib/dpkg/lock 鎖定

ubuntu  換了硬碟,順道把ubuntu升級到16.04,不知道是不是升級關係,遇到不少怪問題,其中在執行sudo apt-get update時,跳出下面訊息:

無法將 /var/lib/dpkg/lock 鎖定 – open (11: 資源戰時無法取得)
Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

解決方式:

  • 將lock檔刪除

sudo rm -rf /var/lib/dpkg/lock

  • 執行更新

sudo apt-get install -f

 

如果又出現鎖定,Can try again and see。

 

[Links]

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.