1

Having some errors after trying to upgrade with apt-get/synaptic. There are several error messages in the output, like:

P: Installing debian theme...cp: cannot stat ‘/usr/share/syslinux/themes/debian-wheezy/extlinux/reboot.c32’: No such file or directory
cp: cannot stat ‘/usr/share/syslinux/themes/debian-wheezy/extlinux/config.c32’: No such file or directory
cp: cannot stat ‘/usr/share/syslinux/themes/debian-wheezy/extlinux/vesamenu.c32’: No such file or directory
cp: cannot stat ‘/usr/share/syslinux/themes/debian-wheezy/extlinux/hdt.c32’: No such file or directory
cp: cannot stat ‘/usr/share/syslinux/themes/debian-wheezy/extlinux/rosh.c32’: No such file or directory
run-parts: /etc/kernel/postinst.d/zz-extlinux exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.19.0-56-generic.postinst line 1025.
dpkg: error processing package linux-image-3.19.0-56-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.19.0-56-generic:
 linux-image-extra-3.19.0-56-generic depends on linux-image-3.19.0-56-generic; however:
  Package linux-image-3.19.0-56-generic is not configured yet.`

Then a cascade of similar messages just adding that one depends on the other one being configured.

Bottom lines are:

`Errors were encountered while processing:
 linux-image-3.19.0-56-generic
 linux-image-extra-3.19.0-56-generic
 linux-image-generic-lts-vivid
 linux-generic-lts-vivid
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've researched around a bit, failing to solve my problem.

Suggestions tried:

  • apt-get install -f

    Gives same∕similar error msg.

  • dpkg --configure linux-image-extra-3.19.0-56-generic

    Tells me:

    dpkg: dependency problems prevent configuration of linux-image-extra-3.19.0-56-generic:
    linux-image-extra-3.19.0-56-generic depends on linux-image-3.19.0-56-generic; however:
    Package linux-image-3.19.0-56-generic is not configured yet.`
    
    `dpkg: error processing package linux-image-extra-3.19.0-56-generic (--configure):
    dependency problems - leaving unconfigured
    
  • Also tried

    apt-get autoremove
    apt-get clean
    apt-get autoclean
    
  • I've checked if there is a lack-of-space-problem - lots of free space.

  • Also tried:

    dpkg --configure --pending
    

    Gives:

    ...
    dpkg: error processing package linux-image-extra-3.19.0-56-generic (--configure):
    dependency problems - leaving unconfigured
    Errors were encountered while processing:
    linux-image-3.19.0-56-generic
    linux-image-extra-3.19.0-56-generic
    

Plus a few more attempts - no luck. (I tried to completely remove old kernels in synaptic also, but that gives me same errors.)


What have I done? Or is it you!? What can I do? Do you need more info?

This isn't causing serious problems that I know of, but I love getting clean outputs from apt-get ;)

And I hate being un-dated/-graded.


EDIT

It is an annoying problem because everytime I use apt-get it tries to work with the kernel-problem!!


EDIT 2

OK, I can't install anything ##AT ALL!


EDIT 3

The Software Updater, Sofware and Updates, Software Center apps are not launching.


EDIT 4

Latest output of apt-get dist-upgrade:

#apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-3.19.0-46-generic linux-image-3.19.0-53-generic
  linux-image-extra-3.19.0-46-generic linux-image-extra-3.19.0-53-generic
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
16 not fully installed or removed.

Need to get 330 MB of archives.
After this operation, 415 MB disk space will be freed.
Do you want to continue? [Y/n] y

Get:1 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-3.19.0-39-generic amd64 3.19.0-39.44~14.04.1 [16,7 MB]
Get:2 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-3.19.0-41-generic amd64 3.19.0-41.46~14.04.2 [16,7 MB]
Get:3 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-3.19.0-42-generic amd64 3.19.0-42.48~14.04.1 [16,7 MB]
Get:4 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-3.19.0-43-generic amd64 3.19.0-43.49~14.04.1 [16,7 MB]
Get:5 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-3.19.0-47-generic amd64 3.19.0-47.53~14.04.1 [16,7 MB]
Get:6 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-3.19.0-56-generic amd64 3.19.0-56.62~14.04.1 [16,8 MB]
Get:7 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-extra-3.19.0-39-generic amd64 3.19.0-39.44~14.04.1 [38,3 MB]
Get:8 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-extra-3.19.0-41-generic amd64 3.19.0-41.46~14.04.2 [38,3 MB]
Get:9 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-extra-3.19.0-42-generic amd64 3.19.0-42.48~14.04.1 [38,3 MB]
Get:10 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-extra-3.19.0-43-generic amd64 3.19.0-43.49~14.04.1 [38,3 MB]
Get:11 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-extra-3.19.0-47-generic amd64 3.19.0-47.53~14.04.1 [38,3 MB]
Get:12 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-extra-3.19.0-56-generic amd64 3.19.0-56.62~14.04.1 [38,3 MB]
Fetched 330 MB in 44min 32s (124 kB/s)                                         
(Reading database ... 366348 files and directories currently installed.)
Removing linux-image-extra-3.19.0-46-generic (3.19.0-46.52~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-3.19.0-46-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-46-generic /boot/vmlinuz-3.19.0-46-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.19.0-46-generic /boot/vmlinuz-3.19.0-46-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-46-generic /boot/vmlinuz-3.19.0-46-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-46-generic
grep: /boot/config-3.19.0-46-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_N1YerM/lib/modules/3.19.0-46-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_N1YerM/lib/modules/3.19.0-46-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.19.0-46-generic /boot/vmlinuz-3.19.0-46-generic
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.19.0-46-generic /boot/vmlinuz-3.19.0-46-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.19.0-54-generic...
P: Writing config for /boot/vmlinuz-3.19.0-49-generic...
P: Installing debian theme...cp: cannot stat ‘/usr/share/syslinux/themes/debian-wheezy/extlinux/vesamenu.c32’: No such file or directory
run-parts: /etc/kernel/postinst.d/zz-extlinux exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-46-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.19.0-46-generic (3.19.0-46.52~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-46-generic /boot/vmlinuz-3.19.0-46-generic
update-initramfs: Deleting /boot/initrd.img-3.19.0-46-generic
run-parts: executing /etc/kernel/postrm.d/zz-extlinux 3.19.0-46-generic /boot/vmlinuz-3.19.0-46-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.19.0-54-generic...
P: Writing config for /boot/vmlinuz-3.19.0-49-generic...
P: Installing debian theme...cp: cannot stat ‘/usr/share/syslinux/themes/debian-wheezy/extlinux/vesamenu.c32’: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-extlinux exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.19.0-46-generic.postrm line 328.
dpkg: error processing package linux-image-3.19.0-46-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-3.19.0-53-generic (3.19.0-53.59~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-3.19.0-53-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-53-generic /boot/vmlinuz-3.19.0-53-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.19.0-53-generic /boot/vmlinuz-3.19.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-53-generic /boot/vmlinuz-3.19.0-53-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-53-generic
grep: /boot/config-3.19.0-53-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_5xBd4F/lib/modules/3.19.0-53-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_5xBd4F/lib/modules/3.19.0-53-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.19.0-53-generic /boot/vmlinuz-3.19.0-53-generic
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.19.0-53-generic /boot/vmlinuz-3.19.0-53-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.19.0-54-generic...
P: Writing config for /boot/vmlinuz-3.19.0-49-generic...
P: Installing debian theme...cp: cannot stat ‘/usr/share/syslinux/themes/debian-wheezy/extlinux/vesamenu.c32’: No such file or directory
run-parts: /etc/kernel/postinst.d/zz-extlinux exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-53-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.19.0-53-generic (3.19.0-53.59~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-53-generic /boot/vmlinuz-3.19.0-53-generic
update-initramfs: Deleting /boot/initrd.img-3.19.0-53-generic
run-parts: executing /etc/kernel/postrm.d/zz-extlinux 3.19.0-53-generic /boot/vmlinuz-3.19.0-53-generic
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.19.0-54-generic...
P: Writing config for /boot/vmlinuz-3.19.0-49-generic...
P: Installing debian theme...cp: cannot stat ‘/usr/share/syslinux/themes/debian-wheezy/extlinux/vesamenu.c32’: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-extlinux exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.19.0-53-generic.postrm line 328.
dpkg: error processing package linux-image-3.19.0-53-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-3.19.0-46-generic
 linux-image-3.19.0-46-generic
 linux-image-extra-3.19.0-53-generic
 linux-image-3.19.0-53-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • OP, can you verify that this is an install of elementary OS and not of Debian Wheezy? – Daniel Foré Mar 23 '16 at 23:04
  • @DanielForé $ lsb_release -a No LSB modules are available. Distributor ID: elementary OS Description: elementary OS Freya Release: 0.3.2 Codename: freya – neb Apr 4 '16 at 20:58
  • I'm wondering if Linux Format has modified this ISO in some way. It's very strange that you have something referencing Debian Wheezy here. What have you installed or changed since you installed the OS? Have you added third party software sources? – Daniel Foré Apr 5 '16 at 2:50
  • @daniel I doubt it is the ISO that has been causing this. I installed it in November, I think, and have not experienced this until now. I have installed lots of different things since then, and added a few repositories, probably third party also. Check out the last edit, please! Maybe it holds a clue - now it seems to have something to do with apport. What if I delete the old kernel-images manually (from live medium?) - and somehow update the lists? Possible? This is greek to me… – neb Apr 5 '16 at 18:32
  • I'm not sure to be honest. This is very strange. I would recommend just doing a clean install. In general, you should not add third party software sources as it is unsafe and can lead to instability. Also, the "dist-upgrade" command should not be used as it is for upgrading between releases, not for regular updates. – Daniel Foré Apr 5 '16 at 19:17
0

For me it seems that there are some files missing in /usr/share/syslinux/themes/debian-wheezy/extlinux

When I list the files on my system in that directory I get this:

linux:/usr/share/syslinux/themes/debian-wheezy/extlinux$ ls -al
total 56
drwxr-xr-x 2 root root  4096 Okt 27 18:53 .
drwxr-xr-x 5 root root  4096 Okt 27 18:53 ..
lrwxrwxrwx 1 root root    38 Apr 15  2015 config.c32 -> ../../../../../lib/syslinux/config.c32
lrwxrwxrwx 1 root root    35 Apr 15  2015 hdt.c32 -> ../../../../../lib/syslinux/hdt.c32
lrwxrwxrwx 1 root root    20 Apr 15  2015 memtest.bin -> /boot/memtest86+.bin
-rw-r--r-- 1 root root   349 Sep 20  2012 menu.cfg
-rw-r--r-- 1 root root   349 Sep 20  2012 other.cfg
lrwxrwxrwx 1 root root    38 Apr 15  2015 reboot.c32 -> ../../../../../lib/syslinux/reboot.c32
lrwxrwxrwx 1 root root    36 Apr 15  2015 rosh.c32 -> ../../../../../lib/syslinux/rosh.c32
-rw-r--r-- 1 root root 31377 Apr 15  2015 splash.png
-rw-r--r-- 1 root root   529 Sep 20  2012 stdmenu.cfg
-rw-r--r-- 1 root root   100 Sep 20  2012 theme.cfg
lrwxrwxrwx 1 root root    40 Apr 15  2015 vesamenu.c32 -> ../../../../../lib/syslinux/vesamenu.c32`

You should compare this to your content here. But it seems that all the symbolic links are broken or gone. With the command sudo dpkg -S /usr/share/syslinux/themes/debian-wheezy/extlinux/config.c32 I found out the package which provides this file and got the name "syslinux-themes-debian-wheezy".

So you should try to reconfigure this package:

sudo dpkg-reconfigure syslinux-themes-debian-wheezy

If this does not work you can try to create the links manually. Go to the directory and type the command (e.g. for config.c32):

cd /usr/share/syslinux/themes/debian-wheezy/extlinux
sudo ln -s ../../../../../lib/syslinux/config.c32 config.c32

For the other files look at the locations in the "ls -al" command above.

NOTE: This is not tested by me! So you should be careful! I would suggest to create a backup of the files stored in /usr/lib/syslinux (destination of the linked files)!

  • Super glad to see this, @Mazienho! I will test your ideas as soon as I have access to the given computer again. @Daniel , can you give a quick tip on how to verify it? I did an Elementary Freya install off of a DVD from LINUX FORMAT MAGAZINE, is that confirmation enough? And what does OP mean? – neb Mar 27 '16 at 21:33
  • Thanks for your answer :) I tried all of your suggestions to no avail. Configuring the wheezy-package returned no error/was silent, and the attempt to link the files manually gave the same output = file exist. I will update the output of 'apt-get upgrade' in my question, because it has changed since the original post as I have attempted different suggestions. It now says that there are no more room for apports. I have way to many old kernels (but no space problems)! Looking forward to hear from you, if you can! – neb Apr 5 '16 at 16:26
0

I think I found a solution

I just edited the /var/lib/dpkg/status file and removed all non-current linux-image-* without install OK install in status.

Now I suppose I could/should remove the kernels themselves from HardDrive?

And not least: WHY did this happen? I've seen it on another Ubuntu-distro, as well: GoBangOS. Bug in the dpkg?

Finally I get to install things again!

(At least from terminal - Software Updater & Software Center still ain't launching...)

  • I added (Solved) to the topic, but @mazienho edited it out (I approved), but why not mark it as solved? – neb Apr 11 '16 at 14:58
0

The problem here is syslinux. apt-get purge syslinux and extlinux, then re-run apt-get install -f and see if that fixes it, then put syslinux/extlinux back if you really need them.

Caution: I'm figuring your system doesn't really REQUIRE those to be there, but maybe it does. I don't want to render your system unbootable. If you didn't put syslinux there on purpose maybe it came in as part of some other package dependency - boot disk creator or something like that. Be careful, pay attention to what apt-get is telling you when it goes to remove it, and YMMV.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.