Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

目標

  • エラーが出て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
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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
ユーザーは見つかりませんでした