Update Issue

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Update Issue

Post by techie716 »

I am also having problems after update. I can no longer use apt as it tells me to do sudo dpkg --configure -a. But when I attempt that it stalls on update-initramfs: Generating /boot/initrd.img-4.8.0-58-generic. I ran an strace sudo dpkg --configure -a and it exit with 1. Now when I run sudo dpkg --configure -a I get this: I ran the first command in case you needed as you asked the last user to run it.
ls /usr/lib32/nvidia-375
ls: cannot access '/usr/lib32/nvidia-375': No such file or directory

Code: Select all

dusty@dusty-HP-Z220-CMT-Workstation ~ $ sudo dpkg --configure -a
Setting up linux-image-4.8.0-53-generic (4.8.0-53.56~16.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-4.8.0-53-generic
) points to /boot/initrd.img-4.8.0-53-generic
 (/boot/initrd.img-4.8.0-53-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.8.0-53-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-4.8.0-53-generic
) points to /boot/vmlinuz-4.8.0-53-generic
 (/boot/vmlinuz-4.8.0-53-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.8.0-53-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic
update-initramfs: Generating /boot/initrd.img-4.8.0-53-generic
cp: cannot stat '/etc/udev/udev.conf': No such file or directory
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.8.0-53-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.8.0-53-generic.postinst line 1052.
dpkg: error processing package linux-image-4.8.0-53-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-kernel-generic:
 linux-kernel-generic depends on linux-image-4.8.0-53-generic; however:
  Package linux-image-4.8.0-53-generic is not configured yet.

dpkg: error processing package linux-kernel-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-extra-4.8.0-53-generic:
 linux-image-extra-4.8.0-53-generic depends on linux-image-4.8.0-53-generic; however:
  Package linux-image-4.8.0-53-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.8.0-53-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-4.8.0-53-generic
 linux-kernel-generic
 linux-image-extra-4.8.0-53-generic
dusty@dusty-HP-Z220-CMT-Workstation ~ $ 
Also I ran this:

Code: Select all

dusty@dusty-HP-Z220-CMT-Workstation ~ $ sudo apt-get install -f

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-extra-4.8.0-58-generic
0 upgraded, 0 newly installed, 1 to remove and 46 not upgraded.
4 not fully installed or removed.
After this operation, 162 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 562423 files and directories currently installed.)
Removing linux-image-extra-4.8.0-58-generic (4.8.0-58.63~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-58-generic /boot/vmlinuz-4.8.0-58-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.8.0-58-generic /boot/vmlinuz-4.8.0-58-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.8.0-58-generic /boot/vmlinuz-4.8.0-58-generic
update-initramfs: Generating /boot/initrd.img-4.8.0-58-generic
cp: cannot stat '/etc/udev/udev.conf': No such file or directory
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.8.0-58-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.8.0-58-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-4.8.0-58-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any help would be greatly appreciated as I have way to much time in this install to just format and start over.. That would need to be the last resort.
Last edited by JeremyB on Mon Sep 04, 2017 4:47 am, edited 1 time in total.
Reason: code tags added
JeremyB
Level 20
Level 20
Posts: 11659
Joined: Fri Feb 21, 2014 8:17 am

Re: Update Issue

Post by JeremyB »

So does

Code: Select all

cat /etc/udev/udev.conf
Return nothing?
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Re: Update Issue

Post by techie716 »

JeremyB wrote:So does

Code: Select all

cat /etc/udev/udev.conf
Return nothing?
dusty@dusty-HP-Z220-CMT-Workstation ~ $ cat /etc/udev/udev.conf
cat: /etc/udev/udev.conf: No such file or directory
dusty@dusty-HP-Z220-CMT-Workstation ~ $
User avatar
WharfRat
Level 21
Level 21
Posts: 13897
Joined: Thu Apr 07, 2011 8:15 pm

Re: Update Issue

Post by WharfRat »

Did you by any chance remove udev :?:

What does apt search udev|grep ^i return :?:
ImageImage
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Re: Update Issue

Post by techie716 »

Not on purpose
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Re: Update Issue

Post by techie716 »

Code: Select all

dusty@dusty-HP-Z220-CMT-Workstation ~ $  apt search udev|grep ^i
i   gir1.2-gudev-1.0                - libgudev-1.0 introspection data           
i   libgudev-1.0-0                  - GObject-based wrapper library for libudev 
i   libgudev-1.0-0:i386             - GObject-based wrapper library for libudev 
i   libgudev1.0-cil                 - GObject-based wrapper library for libudev 
i   libudev1                        - libudev shared library                    
i   libudev1:i386                   - libudev shared library                    
i   system-config-printer-udev      - Printer auto-configuration facility based 
i   udev                            - /dev/ and hotplug management daemon       
dusty@dusty-HP-Z220-CMT-Workstation ~ $
Last edited by WharfRat on Fri Sep 08, 2017 10:37 am, edited 1 time in total.
Reason: Added code tag
JeremyB
Level 20
Level 20
Posts: 11659
Joined: Fri Feb 21, 2014 8:17 am

Re: Update Issue

Post by JeremyB »

Try

Code: Select all

sudo touch /etc/udev/udev.conf
Then try your updates again
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Re: Update Issue

Post by techie716 »

$ sudo apt-get install -fReading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-extra-4.8.0-58-generic
0 upgraded, 0 newly installed, 1 to remove and 52 not upgraded.
4 not fully installed or removed.
After this operation, 162 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 562423 files and directories currently installed.)
Removing linux-image-extra-4.8.0-58-generic (4.8.0-58.63~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-58-generic /boot/vmlinuz-4.8.0-58-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.8.0-58-generic /boot/vmlinuz-4.8.0-58-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.8.0-58-generic /boot/vmlinuz-4.8.0-58-generic
update-initramfs: Generating /boot/initrd.img-4.8.0-58-generic


It is stalled at the last line above. what does the touch command do please?
Last edited by WharfRat on Fri Sep 08, 2017 10:37 am, edited 1 time in total.
Reason: Added code tag
User avatar
WharfRat
Level 21
Level 21
Posts: 13897
Joined: Thu Apr 07, 2011 8:15 pm

Re: Update Issue

Post by WharfRat »

The update-initramfs could take two or three minutes. Don't kill it right a way/

The touch command created file /etc/udev/udev.conf just to satisfy apt.

Can you install debsums :?:
ImageImage
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Re: Update Issue

Post by techie716 »

While trying to run update manager I get :


Unable to get exclusive lock

This usually means that another package management application (like apt-get or aptitude) is already running. Please close that application first.
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Re: Update Issue

Post by techie716 »

Code: Select all

sudo apt-get install -f
[sudo] password for dusty: 
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?
dusty@dusty-HP-Z220-CMT-Workstation ~ $
Last edited by WharfRat on Fri Sep 08, 2017 10:38 am, edited 1 time in total.
Reason: Added code tag
JeremyB
Level 20
Level 20
Posts: 11659
Joined: Fri Feb 21, 2014 8:17 am

Re: Update Issue

Post by JeremyB »

Do you have the Update Manager, Synaptic, Software Sources, or another updater open?
User avatar
WharfRat
Level 21
Level 21
Posts: 13897
Joined: Thu Apr 07, 2011 8:15 pm

Re: Update Issue

Post by WharfRat »

techie716 wrote:sudo apt-get install -f
[sudo] password for dusty:
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?
dusty@dusty-HP-Z220-CMT-Workstation ~ $
That just means that the update manager was probably running at the time - so just try it again.
ImageImage
JeremyB
Level 20
Level 20
Posts: 11659
Joined: Fri Feb 21, 2014 8:17 am

Re: Update Issue

Post by JeremyB »

WharfRat wrote:
techie716 wrote:sudo apt-get install -f
[sudo] password for dusty:
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?
dusty@dusty-HP-Z220-CMT-Workstation ~ $
That just means that the update manager was probably running at the time - so just try it again.
Is there an echo in here? :D
User avatar
WharfRat
Level 21
Level 21
Posts: 13897
Joined: Thu Apr 07, 2011 8:15 pm

Re: Update Issue

Post by WharfRat »

JeremyB wrote:
WharfRat wrote:
techie716 wrote:sudo apt-get install -f
[sudo] password for dusty:
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?
dusty@dusty-HP-Z220-CMT-Workstation ~ $
That just means that the update manager was probably running at the time - so just try it again.
Is there an echo in here? :D
Apparently :D
ImageImage
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Re: Update Issue

Post by techie716 »

I have tried several times without any terminals open and I still get the same thing. I know there was a command to show me apps that were running and then you could kill them. but i cannot remember
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Re: Update Issue

Post by techie716 »

Code: Select all

dusty@dusty-HP-Z220-CMT-Workstation ~ $ sudo aptitude install gparted
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?
W: Could not lock the cache file; this usually means that dpkg or another apt tool is already installing packages.  Opening in read-only mode; any changes you make to the states of packages will NOT be preserved!
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?
dusty@dusty-HP-Z220-CMT-Workstation ~ $
Last edited by WharfRat on Fri Sep 08, 2017 10:38 am, edited 1 time in total.
Reason: Added code tag
JeremyB
Level 20
Level 20
Posts: 11659
Joined: Fri Feb 21, 2014 8:17 am

Re: Update Issue

Post by JeremyB »

A reboot might clear the lock
techie716
Level 2
Level 2
Posts: 51
Joined: Mon Sep 04, 2017 1:43 am

Re: Update Issue

Post by techie716 »

I'll try and post after rebooting
User avatar
Termy
Level 5
Level 5
Posts: 776
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Update Issue

Post by Termy »

For future reference, OP, the command you were thinking of was probably lsof, which can be used as follows, to follow what is using the apt-get program:

Code: Select all

/usr/bin/lsof -c apt-get 2> /dev/null
Or, to ensure all information is shown and (hopefully) correct, use sudo:

Code: Select all

/usr/bin/sudo /usr/bin/lsof -c apt-get
If you're curious, I entered 2> /dev/null the first time to avoid the "Output information may be incomplete." warning message.

You might find it useful to do as I just did, which is using the watch command to get live feedback:

Code: Select all

/usr/bin/watch -n 0.3 "/usr/bin/lsof -c apt-get 2> /dev/null"
See man kill, man killall, man xkill, man skill, and/or man pkill if you'd like to know more about killing processes and how to do it. The killall program is part of the psmisc package, so if it's not found, you could install that; it's useful.

The kill command is both a builtin for bash and a GNU version thereof, so you can use either kill or /bin/kill.

As for the whole locking thing, I would not have restarted, because stopping a package manager mid-processing could potentially leave you with a bit of a mess. I've done it before and had no issues, but still I wouldn't take the risk. Next time, I recommend using the above command(s) to ascertain what's using it, then, see if it's actually doing anything, which might indicate whether you could get away with logging out, or even rebooting:

Once you have the PID for the process(es) which you've discovered is holding your package manager hostage, enter ps <PID> and pay attention to the STAT column; this, alongside checking out the man ps if you aren't familiar with STAT output, may well help. I dunno how reliable that would be, but I think it's better than restarting blindly.

I know it all sounds tedious, but it beats leaving a mess, in my opinion, although from what I've seen, Debian/Ubuntu CLI package managers seem to handle mishaps really well.

Good luck with main problem, and sorry I couldn't add anything to that. Hope the restart helped.
Here to help.

I'm LearnLinux (LL) on YouTube: https://www.youtube.com/channel/UCfp-lN ... naEE6NtDSg
I'm also terminalforlife (TFL) on GitHub: https://github.com/terminalforlife
Post Reply

Return to “Newbie Questions”