Trong quá trình apt-get update khi sử dụng Kali có thể gặp lỗi Could not get lock /var/lib/dpkg/lock khá khó chịu. Và cách giải quyết như sau:

“E: Could not get lock /var/lib/dpkg/lock” error

Điều này xảy ra khi cố gắng  apt-get update


root@kali:~# apt-get update
Hit http://http.kali.org sana InRelease       
Hit http://security.kali.org sana/updates InRelease
.
Hit http://security.kali.org sana/updates/non-free amd64 Packages              
Fetched 9,334 kB in 2min 18s (67.5 kB/s)                                       
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?



Cách giải quyết vấn đề như sau: gõ lệnh


root@kali:~# rm /var/cache/apt/archives/lock


Và sau đó update


root@kali:~# apt-get update
.
.
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?


Một vài trường hợp có thể khắc phục lỗi thành công. Một số khác vẫn bị lỗi thì làm theo cách sau:


root@kali:~# rm /var/lib/dpkg/lock


Và sau đó update lại lần nữa



root@kali:~# apt-get update
Hit http://security.kali.org sana/updates InRelease
.
.
Reading package lists... Done                                                  
root@kali:~#


Cập nhật thành công. Done :))

Và tiếp tục nào  apt-get upgrade


root@kali:~# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  armitage gr-osmosdr iceweasel john john-data libgnuradio-osmosdr0.1.3
  libgnutls-deb0-28 libgnutls-openssl27 libsnmp-base libsnmp-perl libsnmp30
  openvas python-hpack python-impacket python-pyperclip snmp snmpd
17 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/70.6 MB of archives.
After this operation, 12.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 323261 files and directories currently installed.).
.
.
root@kali:~#





Chúc bạn thành công!



Chia Sẻ:
Magpress

MagPress

Vestibulum bibendum felis sit amet dolor auctor molestie. In dignissim eget nibh id dapibus. Fusce et suscipit orci. Aliquam sit amet urna lorem. Duis eu imperdiet nunc, non imperdiet libero.

0 comments so far,add yours

Cám ơn đã ghé thăm BlogCNTT!
- Mọi thắc mắc, gợi ý hoặc bình luận xin chia sẻ bên dưới hoặc Liên Hệ
- Hãy viết bằng tiếng Việt có dấu để mọi người dễ đọc hơn!
Thank You!