DPKG error and unable to lock directory
I did upgrade , had problem, ran update manager, and terninal again without rebooting.... Not sure if not rebooting after first 3 upgrade attemps caused further problem?
I finally did reboot and post the result #4 which had no problem. I list the results of the 3 terminal upgrades by numbering them. I did not post the results of my 2nd upgrade via update manager.... Since the last upgrade showed no problem, is it fixed? Is the dpkg database corrupted? Does #3 need fixed? Unable to lock directory /var/cache/apt/archives/ #1 I ran terminal upgrade and got this Code:
dpkg: error processing package libglib2.0-0:i386 (--configure): #2 I failed to reboot, and ran update manager and it had problems as well.Did not copy that here. #3 Again failed to reboot and ran terminal and got this Code:
The following packages were automatically installed and are no longer required: #4 I then did a reboot, and ran terminal and got this Code:
Setting up libgtk-3-bin (3.24.20-0ubuntu1.1) ... Sub-process /usr/bin/dpkg returned an error code (1)” In Ubuntu Found this Code:
One of the triggers of this error is a corrupted dpkg database. This can be caused by the sudden interruption of the installation of a software package. Reconfiguring the database is one way to resolve this issue. Maggie |
Hi
If your using a Ubuntu based system than use these commands in the commandline. I have had this issue due to a mirrors being down not often but run these. Code:
sudo dpkg --configure -a Code:
sudo apt update && sudo apt upgrade Code:
Unable to lock directory /var/cache/apt/archives/ |
Hi dave67,
Thank you for your post ! Did my first command Code:
There were no entries made..... Here is the result Code:
maggie@linux ~ $ sudo dpkg --configure -a Code:
Uninstall Beginning -------- Thanks, Maggie |
1 Attachment(s)
Hi Maggie
Yes All looks good. I however have never seen ndiswrapper installed in a long time. I would like to see the network card info with the following command below. If you do not mind I would like to know your computer model and brand. I am curious as to why ndiswrapper is installed. Code:
sudo lshw -class network There seems to be many kernels installed which takes up space on the hard disk. I tend to keep my system with only two installed. The active and one kernel version below it. In my cause it looks like the attachment. To access this screen open update manager than click on view and than Linux kernels. If you post the screen shot I can advise which ones to remove. You can check which one is being used now by typing in the command line. Code:
uname -r |
1 Attachment(s)
Hi dave67,
My laptop is an HP model 15-1033 wm Here is the result of the command Code:
maggie@linux ~ $ sudo lshw -class network Before I got the above info, I ran an upgrade and got the following... Should I post it as a new problem, or can you address it here ? Thanks ! Code:
The following packages will be upgraded: |
The en_us.utf8 warning isn't critical it's been there for a few releases.
The wifi card has been support in the linux kernel since kernel 4.17+. You can remove the ndiswrapper. Code:
sudo apt remove ndiswrapper |
Result :
Code:
maggie@linux ~ $ sudo apt remove ndiswrapper You have been very helpful, and use layman's terms which I appreciate! Maggie |
Result :
Code:
maggie@linux ~ $ sudo apt remove ndiswrapper You have been very helpful, and use layman's terms which I appreciate! Maggie |
No sounds good. I when back re-read post 3 and I missed that the package ndiswrapper was removed than. But all good now. Now you can use update manager now for updates.
Your welcome |
dave67,
For future reference.related to "only time you need to reboot after is a kernel update", what words do I look for that tell me there is a kernel being updated ? I clicked on my active kernel and then it looked like your screen print for the #2 installed kernel.... " There seems to be many kernels installed which takes up space on the hard disk " What was your tip off there may be too many kernels installed on my computer ? Am I correct that I only have 2 kernels installed as you recommend ? Thanks again for your patience and help ! Maggie |
If you use update manager you will see a kernel update listed in the available updates. Once the system updates are installed and a kernel is installed you will see a message to reboot.
My tip off was the lower output of post 5 Code:
update-initramfs: Generating /boot/initrd.img-5.4.0-100-generic Code:
update-initramfs: Generating /boot/initrd.img-5.4.0-99-generic Code:
update-initramfs: Generating /boot/initrd.img-5.0.0-32-generic As for having only 2 kernels I do that to save space. When new kernels are installed old ones are not removed or in use they take up HDD space. This might help with battery power on the laptop. It does on mine. Code:
sudo apt install tlp Code:
sudo tlp-stat https://linrunner.de/tlp/introduction.html If the en_US.utf8 error bugs you you can fix it like this Code:
sudo locale-gen --purge --no-archive Code:
sudo update-initramfs -u -t |
dave67,
Hmmm, it was your post #4 that noted maybe too many kernels. I bet it was my post #3. Though I usually use terminal to update, I will now see if update manager specifies a kernel being updated. :) I clicked on kernels in update manager. All of 5.11 and 5.8 are end of life. And 5.0 is unsupported. Are they all taking up space? If so, is it safe I remove them using update manager ? Thanks for how to fix en_US.utf8 error and how to help battery power :) Good grief. Yesterday, I ran an upgrade and got this wanring : Code:
update-binfmts: warning: current package is openjdk-11, but binary format alread If so, do you want me to post it as a new problem ? Thanks again ! Maggie |
Hi Magster
Those kernels 5.8 and 5.11 are not install automatically. The only LM distribution that uses 5.8 is edge. And it's for newer hardware. This below has been reported as a bug in Debian. Its a Java it's a minor issue. I will look into it more. Code:
update-binfmts: warning: current package is openjdk-11, but binary format already installed by openjdk-8 What does this command output have. Code:
binfmts --display |
Hi dave67,
Thanks for responding. Here is the result: Code:
maggie@linux ~ $ binfmts --display Here is result of command to see if the battery saving command is active. Does it look okay ? Code:
maggie@linux ~ $ sudo tlp-stat |
The tlp-stat looks great.
The binfmts package not installed on your system and its not installed on mine either. that is why command not found. binfmts: command not found Its a minor bug and its not going to harm anything. It seems this issue had been around since Ubuntu 17.04. though I do not get this error on my system. Though there is a update for openjdk.its java package which is a security update. I would not worry about it. |
All times are GMT -5. The time now is 01:08 AM. |