Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
51
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

@jizo

apt-getでエラーが出た場合の対処法:E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

目標

  • エラーが出てapt-getが操作できない問題を解決

環境

  • Ubuntu 14.04.5 LTS

問題

端末操作を誤って、apt-getプロセスを殺してしまいその後操作してもエラーとなってしまう

$ sudo apt-get install python-numpy
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

対処法

同じ現象の質問と対処方法の回答が載っているページを見つけたので実施したら解決した
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) [duplicate]

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
51
Help us understand the problem. What are the problem?