Last update at :2024-05-24,Edit by888u
Does the following situation occur when using ubuntu, especially when installing or updating: 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? As a result, it cannot proceed?
The simplest and most direct way:
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
In most cases, the cause of the problem is that other programs such as system automatic updates, Synaptic, etc. are using the apt-get process, so the solution is to close this process.
The details are as follows:
1. ps-aux finds out the PID of the apt-get process, which is usually a four-digit number.
2. Use sudo kill PID code to kill the process
3. Use sudo apt-get update and sudo apt-get dist-upgrade to upgrade.
Method 1:
Execute sudo dpkg –configure -a
Method 2 (can be used for personal testing):
sudo rm /var/lib/apt/lists/lock
Method 3:
1. ps-aux finds out the PID of the apt-get process,
2. Use sudo kill PID code to kill the process (I always find the process with the word apt and kill it)
The actual cause of the error: It is caused by referencing the wrong link.
Solution (just delete these references):
cd /var/lib/dpkg/updates rm -r ./*After deletion, execute sudo apt-get update, and then you can install the software normally.
Recommended site searches: free com domain name application, registered domain name, Taiwan proxy server, China domain name trading center, virtual space free trial, IP check, Japanese server free, US server, PHP space rental, domain name history,
发表评论