You may receive an error that the lock file resource could not be opened, temporarily unavailable. There are several ways to solve this problem, which we will talk about shortly.
Approved: Fortect
I recently tried to install an application using the a commandpt in Ubuntu when it encounters the following error:
E: no lock possible / var / lib / dpkg / lock – open (11: resource temporarily unavailable)
E: admin page (/ var / lib / dpkg /) cannot be locked, this is another process using her ?
E: failed to acquire lock / var / lib / apt / lists / lock (11: resource temporarily unavailable)
E: list / var / lib / apt / lists / cannot be locked E: cannot be attached be attached / var / lib / dpkg / lock – open (11: resource temporarily unavailable)
E: admin view page (/ var / lib / dpkg /) cannot be locked, is it another process?
Some contributors may see this when using the software center:
These errors are very similar to another common Ubuntu error: the / var / cache / apt / archives / directory cannot be protected, and it is no doubt interesting that the fixes are very similar.
Fixed Error “Administrative Directory (/ Var / Lib / Dpkg /) Cannot Be Locked”
You like this error because the program always tries to update Ubuntu. When a type of command or application partially updates the system or mouthIt installs new software, it is the dpkg (Debian Package Manager) file.
This lock is designed in such a way that the two functions do not change the content at the same time, as this can lead to unnecessary situations and, possibly, to system breakdown.
Let us know what steps you can take to change the output of the Unable Lock Authorities directory.
Method 0:
The first thing to do is check if another process is performing a system update or a trusted installer.
If you are using a command call, check if an application such as Software Center, Software Synaptic Updater, Package Manager, Gdebi can update / install. If yes, wait until the end of the program.
If no application is running, check all the terminal creation windows and make sure you still have the update or approach installed. If so, wait until the end.
If none of the above events occur, compare what other process the maintainer (the package command handler for managing software) is running. Use this command:
ps aux | grep -iapt
[email address is being protected] : ~ $ p. S. to | grep aptRoot -i 1464 0.0 0.0 4624 772? Ss 19:08 0:00 / bin / sh /usr/lib/apt/apt.systemd.daily updateRoot 1484 0.0 0.0 4624! ! ! 1676 S 19:08 0:00 / bin / sh /usr/lib/apt/apt.systemd.daily lock_is_held update_apt 2836 0.8 0.1 96912 9432? ! ? From 19:09 0:03 / usr / lib / apt / methods / httpabhishek 6172 0.0 0.0 21532 1152 dots / 1 S + 19:16 0:00 grep --color = auto -i apt
If you are familiar with apt, which is used in an ideal program like apt.systemd.daily update, you are in luck, my dear reader.
This is a huge daemon that automatically checks for system updates in the background at system startup.
On Ubuntu 18.04 and later mid-versions, you can even try to get it and install critical security updates yourself. At least that’s what I see in the default settings for the Software & Updates tool on the Ubuntu desktop.
If you are on an Ubuntu server, clients can check the contents of the new /etc/apt/apt.conf.d/20auto-upgrades file to see if automatic updates are enabled.
So, if you see that apt.systemd.daily is using the apt process, all you need withto do is wait the last few minutes. After the automatic update is complete, you will be able to install the related software as usual.
As a workaround, most people can permanently disable automatic and automatic check for updates, but I don’t recommend doing this for security reasons.
The thing is, it was a simple script that was easy to deal with. But this is not always the case. If your future program uses apt, leave it differently.
Method 1:
Use Linux as your main command line to find and stop these running processes. To do this, use the following command:
Approved: Fortect
Fortect is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, Fortect quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
ps aux | grep -i apt
This will probably show you the id of the apt or apt-get methods being executed. In the example below, the process ID is usually 7343. You can ignore the last line containing “grep –color = auto”.
You can use process detection to abort it by typing SIGTERM signal . Replace
sudo kill if
Make sure the project is running by running ps aux | … The grep -i apt ‘command was aborted. If the computer is still running, turn it off with a SIGKILL signal:
sudo kill -9
Another simpler trick is to use the killall command. This will terminate all instances of the running program:
sudo apt killall apt-get
Method 2
In most cases, the direct method solves the problem. But my spelling was a little different. I was about to update my system and accidentally closed the final version. This caused some processes to run constantly, but the error still showed the error to others.
In this case, the main reason is the lock file. As mentioned recently, lock files are designed to prevent two or more processes from using the same master data. Apt if or apt-get commands work, create in some placesfile locking. If the previous apt command did not succeed, all lock files are not removed and thus further instances of apt-get commands or
To solve the problem, you need to delete the lock files. But before buyers do it, it would be a good idea to stop any process that is actually using file locking.
Use lsof get to get a process identification for all processes containing lock files. Check the nature of the error and see what lock files it is complaining about and get an overview of the processes containing those e-lock files.
sudo lsof / var / lib / dpkg / locksudo / var / lib / apt / lists / blockingsudo lsof lso
Speed up your computer's performance now with this simple download.