apt-get não está funcionando no Ubuntu 16.04, problemas com pacotes do kernel

3

Sempre que tento instalar algo com apt-get , recebo este erro

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  kde-l10n-engb linux-image-4.4.0-21-generic
  linux-image-extra-4.4.0-21-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 483 not upgraded.
8 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-4.4.0-31-generic (4.4.0-31.50) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-28-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-31-generic
cp: omitting directory '/etc/udev/rules.d/49-teensy.rules'
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-31-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.4.0-31-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-31-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-31-generic:
 linux-image-extra-4.4.0-31-generic depends on linux-image-4.4.0-31-generic; however:
  Package linux-image-4.4.0-31-generic is not configured yet.

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

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 4.4.0.31.33); however:
  Package linux-image-generic is not configured No apport report written because the error message indicates its a followup error from a previous failure.
                                                                          No apport report written because the error message indicates its a followup error from a previous failure.
                    No apport report written because MaxReports is reached already
  yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
Setting up linux-image-4.4.0-24-generic (4.4.0-24.43) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-31-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-24-generic
cp: omitting directory '/etc/udev/rules.d/49-teensy.rules'
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-24-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.4.0-24-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-24-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              Setting up linux-image-4.4.0-28-generic (4.4.0-28.47) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-24-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-28-generic
cp: omitting directory '/etc/udev/rules.d/49-teensy.rules'
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-28-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.4.0-28-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-28-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-24-generic:
 linux-image-extra-4.4.0-24-generic depends on linux-image-4.4.0-24-generic; however:
  Package linux-image-4.4.0-24-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-24-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-28-generic:
 linux-image-extra-4.4.0-28-generic depends on linux-image-4.4.0-28-generic; however:
  Package linux-image-4.4.0-28-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-28-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-4.4.0-31-generic
 linux-image-extra-4.4.0-31-generic
 linux-image-generic
 linux-generic
 linux-image-4.4.0-24-generic
 linux-image-4.4.0-28-generic
 linux-image-extra-4.4.0-24-generic
 linux-image-extra-4.4.0-28-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo dpkg --configure -a dá o mesmo resultado

    
por J Twine 04.08.2016 / 12:23

3 respostas

8

O problema está aqui.

cp: omitindo o diretório '/etc/udev/rules.d/49-teensy.rules'

Remova esse diretório e execute novamente e tudo ficará bem.

    
por drgr33n 05.08.2016 / 12:09
1

Para mim isso ajudou!
Apenas remova todos os arquivos linux-image e image-extra, que são problemáticos executando:

$sudo mv /var/lib/dpkg/info/<>packagename<>.* /tmp/
$sudo apt-get autoremove && sudo apt-get autoclean

Em seguida, atualize / instale o mais recente executando:

$sudo apt-get install linux-generic
    
por deb 03.04.2017 / 17:58
0

Para mim, isso ajudou! Apenas remova todos os arquivos linux-image e image-extra, que são problemáticos executando:

$ sudo mv / var / lib / dpkg / info / linux-image- . / tmp / $ sudo apt-get autoremove & amp; & amp; sudo apt-get autoclean

linux-image-generic já foi instalado, mas não foi limpo corretamente

    
por Christopher Anderson 02.11.2017 / 21:08

Tags