Skip to main content

How to Fix ‘E: Could not get lock /var/lib/dpkg/lock’ Error in Ubuntu Linux

How to Fix ‘E: Could not get lock /var/lib/dpkg/lock’ Error in Ubuntu Linux


Run these commands one by one.
>>


sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a
=================================

This may happen if

  1. 'Synaptic Package Manager' or 'Software Updater' is open.

  2. Some apt command is running in Terminal.

  3. Some apt process is running in background.

For above wait for the process to complete. If this does not happen run in terminal:

sudo killall apt apt-get

If none of the above works, remove the lock files. Run in terminal:

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*

then reconfigure the packages. Run in terminal:

sudo dpkg --configure -a

and

sudo apt update

That should do the job.


Comments

Popular posts from this blog

Tutorials Download Link | Software Download Link

  ====================================================== BooKs ====================================================== Ebooks Collection : Click Here ====================================================== Tutorials ======================================================   All Useful Google Drive Links 300 TB Link – https://drive.google.com/drive/folders/1oCMgJeBc55NuEasPcgwjx2FuPdQd8neu Heaven 50TB – https://drive.google.com/drive/folders/1hxe7Des-ooQpamAtjyR7CX-k_hyqlQ7Q Plenty Of Udemy Courses – https://drive.google.com/drive/u/0/folders/1RDGY0Q3WBO_OE1gyImUn1W2ybFuFo6AQ 1.25 TB Course Collection – https://drive.google.com/drive/u/0/folders/1ASdn3H_kF_HsNswsQc4F3rh_PHmGNjKK DK English Books – https://drive.google.com/drive/u/1/folders/13NgYNawnbS3YqExM9Zi3y2YYSqyVr7Xd SAT Books & Past Exams – https://drive.google.com/drive/u/0/folders/14P77CHMXbErX19AUc5A05lEb_UcEAT8E Mixed Folder – https://drive.google.com/drive/folders/1DsvR68wjyT1WbNZb6tgzFep_3-hzecXm TKT Books – https:...

Government Job Opportunities for EEE, ECE & ETE Graduates in Bangladesh

🚀 Government Job Opportunities for EEE, ECE & ETE Graduates in Bangladesh If you are a graduate in Electrical and Electronic Engineering (EEE) , Electronics and Communication Engineering (ECE)  or Electronics and Telecommunication Engineering (ETE) , you have a vast field of career possibilities within the government sector of Bangladesh. Whether it's power, energy, telecom, infrastructure, or scientific research, your academic background aligns directly with the technical needs of numerous public organizations. Many of these entities publish regular job circulars , making them a prime target for stable and prestigious employment. Here's a comprehensive list of government organizations and entities where you can build a solid and impactful career: ⚡ Power Division: This is one of the most active fields for EEE graduates, offering roles in electricity distribution, transmission, generation , and policy & planning . 1. Distribution Companies: BPDB (Bangladesh ...

Configure QUANTUM ESPRESSO Parallel execution Setup/Installation procedure

To install QE with Parallel:  extract QE download from [www.quantum-espresso.org] & Extract. goto inside qe-6.6 or Download From Here ................. Open a Terminal ..................... >> sudo apt-get update >> sudo apt-get upgrade >> sudo apt-get install gfortran >> ./configure >> sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev [you must have to install libopenmpi-dev or intel mpi  so that the mpi can communicate with processor otherwise it will be serial] >> ./configure  >> make all ...................... If after configuration if it shows ( ./configure ) Parallel environment detected successfully.\ Configured for compilation of parallel executables. For more info, read the ESPRESSO User's Guide (Doc/users-guide.tex). -------------------------------------------------------------------- configure: success Then ................................. Done ................................