dpkg 프런트엔드 잠금(/var/lib/dpkg/lock-frontend)을 얻을 수 없습니다. 루트입니까?

dpkg 프런트엔드 잠금(/var/lib/dpkg/lock-frontend)을 얻을 수 없습니다. 루트입니까?
(base) rusiru@rusiru-X556UV:~$ sudo apt-get upgrade
Reading packages lists... Done
Building dependency tree
Reading state information... Done
E: The package packettracer needs to be installed, but I can't find an archive for it.
(base) rusiru@rusiru-X556UV:~$ sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://lk.archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://lk.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://lk.archive.ubuntu.com focal-backports InRelease
Reading package lists... Done
(base) rusiru@rusiru-X556UV:~$ sudo apt-get upgrade
Reading packages lists... Done
Building dependency tree
Reading state information... Done
E: The package packettracer needs to be installed, but I can't find an archive for it.
(base) rusiru@rusiru-X556UV:~$ sudo apt-get update && apt-get install --reinstall packettracer
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://lk.archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://lk.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://lk.archive.ubuntu.com focal-backports InRelease
Reading package lists... Done
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
(base) rusiru@rusiru-X556UV:~$ sudo dpkg -l packettracer
Desired-Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/half-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
pHR packettracer   7.3.0        amd64        (no description available)
(base) rusiru@rusiru-X556UV:~$ sudo apt-get upgrade
Reading packages lists... Done
Building dependency tree
Reading state information... Done
E: The package packettracer needs to be installed, but I can't find an archive for it.
(base) rusiru@rusiru-X556UV:~$ 

나는 이것을 시도했지만 성공하지 못했습니다. 이 문제를 어떻게 해결할 수 있나요?

답변1

명령 apt-get install --reinstall앞에 sudo가 없습니다 .

다음과 같은 명령sudo x && y 오직x다음 명령을 실행하십시오 . sudoy명령은 일반 사용자 권한으로 실행됩니다.

따라서 해당 구문을 사용하려면 그렇게 해야 합니다 sudo x && sudo y.

답변2

Kali Linux에서 다음 중 하나를 사용하여 사용할 수 있습니다.

sudo apt-get update && sudo apt-get upgrade -y

답변3

매우 늦었다는 것을 알고 있지만 sudo su 실행하려는 명령을 입력하고 다시 시도하는 것이 더 쉽습니다.

관련 정보