Não é possível atualizar ou instalar qualquer pacote devido ao dpkg: erro no linux-image

1

Não consigo executar nenhuma instalação e, obviamente, nenhuma atualização.
Exemplo eu quero instalar o ukuu e depois o
Mensagem de erro parece como abaixo:

 

sudo apt install ukuu
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  aptitude aptitude-common aria2 libcwidget3v5
Suggested packages:
  aptitude-doc-en | aptitude-doc apt-xapian-index debtags tasksel libcwidget-dev
The following NEW packages will be installed:
  aptitude aptitude-common aria2 libcwidget3v5 ukuu
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
Need to get 4,022 kB of archives.
After this operation, 17.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ubuntu.ntc.net.np/ubuntu zesty/main amd64 aptitude-common all 0.8.3-1ubuntu4 [835 kB]
Get:2 http://ppa.launchpad.net/teejee2008/ppa/ubuntu zesty/main amd64 ukuu amd64 17.2.3~77~ubuntu17.04.1 [217 kB]
Get:3 http://ubuntu.ntc.net.np/ubuntu zesty/main amd64 libcwidget3v5 amd64 0.5.17-4ubuntu2 [292 kB]
Get:4 http://ubuntu.ntc.net.np/ubuntu zesty/main amd64 aptitude amd64 0.8.3-1ubuntu4 [1,446 kB]
Get:5 http://ubuntu.ntc.net.np/ubuntu zesty/universe amd64 aria2 amd64 1.30.0-2 [1,233 kB]
Fetched 4,022 kB in 6s (598 kB/s)                                                                                                                                        
Selecting previously unselected package aptitude-common.
(Reading database ... 487093 files and directories currently installed.)
Preparing to unpack .../aptitude-common_0.8.3-1ubuntu4_all.deb ...
Unpacking aptitude-common (0.8.3-1ubuntu4) ...
Selecting previously unselected package libcwidget3v5:amd64.
Preparing to unpack .../libcwidget3v5_0.5.17-4ubuntu2_amd64.deb ...
Unpacking libcwidget3v5:amd64 (0.5.17-4ubuntu2) ...
Selecting previously unselected package aptitude.
Preparing to unpack .../aptitude_0.8.3-1ubuntu4_amd64.deb ...
Unpacking aptitude (0.8.3-1ubuntu4) ...
Selecting previously unselected package aria2.
Preparing to unpack .../aria2_1.30.0-2_amd64.deb ...
Unpacking aria2 (1.30.0-2) ...
Selecting previously unselected package ukuu.
Preparing to unpack .../ukuu_17.2.3~77~ubuntu17.04.1_amd64.deb ...
Unpacking ukuu (17.2.3~77~ubuntu17.04.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu2) ...
Processing triggers for libglib2.0-0:amd64 (2.52.0-1) ...
No such key 'sort-directories-first' in schema 'org.gnome.nautilus.preferences' as specified in override file '/usr/share/glib-2.0/schemas/20_ubuntu-gnome-default-settings.gschema.override'; ignoring override for this key.
No such key 'enable-interactive-search' in schema 'org.gnome.nautilus.preferences' as specified in override file '/usr/share/glib-2.0/schemas/20_ubuntu-gnome-default-settings.gschema.override'; ignoring override for this key.
Processing triggers for menu (2.1.47ubuntu1) ...

 ###Then Problem starts with the linux-image as###

Setting up linux-image-4.10.0-24-generic (4.10.0-24.28) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.10.0-19-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-24-generic /boot/vmlinuz-4.10.0-24-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-24-generic /boot/vmlinuz-4.10.0-24-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-24-generic /boot/vmlinuz-4.10.0-24-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-24-generic
cp: cannot stat '/etc/udev/rules.d/60-vboxdrv': No such file or directory
cp: cannot stat '(copy).rules': No such file or directory
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.10.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.10.0-24-generic.postinst line 1052.
dpkg: error processing package linux-image-4.10.0-24-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up aptitude-common (0.8.3-1ubuntu4) ...
Setting up linux-image-4.10.0-21-generic (4.10.0-21.23) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.10.0-24-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-21-generic /boot/vmlinuz-4.10.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-21-generic /boot/vmlinuz-4.10.0-21-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-21-generic /boot/vmlinuz-4.10.0-21-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-21-generic
cp: cannot stat '/etc/udev/rules.d/60-vboxdrv': No such file or directory
cp: cannot stat '(copy).rules': No such file or directory
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.10.0-21-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.10.0-21-generic.postinst line 1052.
dpkg: error processing package linux-image-4.10.0-21-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up aria2 (1.30.0-2) ...
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
Setting up linux-image-4.10.0-19-generic (4.10.0-19.21) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.10.0-21-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-19-generic /boot/vmlinuz-4.10.0-19-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-19-generic /boot/vmlinuz-4.10.0-19-generic
dkms: WARNING: Linux headers are missing, which may explain the above failures.
      please install the linux-headers-4.10.0-19-generic package to fix this.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-19-generic /boot/vmlinuz-4.10.0-19-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-19-generic
cp: cannot stat '/etc/udev/rules.d/60-vboxdrv': No such file or directory
cp: cannot stat '(copy).rules': No such file or directory
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.10.0-19-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.10.0-19-generic.postinst line 1052.
dpkg: error processing package linux-image-4.10.0-19-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libcwidget3v5:amd64 (0.5.17-4ubuntu2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-4.10.0-24-generic; however:
  Package linux-image-4.10.0-24-generic is not configured yet.

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

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

dpkg: error processing package linux-image-extra-4.10.0-19-generic (--configure):
 dependency problems - leaving unconfigured
Setting up aptitude (0.8.3-1ubuntu4) ...
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                                                                                                            update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode
dpkg: dependency problems prevent configuration of linux-image-extra-4.10.0-21-generic:
 linux-image-extra-4.10.0-21-generic depends on linux-image-4.10.0-21-generic; however:
  Package linux-image-4.10.0-21-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.10.0-21-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-generic:
 linux-generic depends on linux-image-generic (= 4.10.0.24.26); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
Setting up ukuu (17.2.3~77~ubuntu17.04.1) ...
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
Processing triggers for menu (2.1.47ubuntu1) ...
Errors were encountered while processing:
 linux-image-4.10.0-24-generic
 linux-image-4.10.0-21-generic
 linux-image-4.10.0-19-generic
 linux-image-generic
 linux-image-extra-4.10.0-24-generic
 linux-image-extra-4.10.0-19-generic
 linux-image-extra-4.10.0-21-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Eu tentei remover pacotes quebrados de /var/lib/dpkg/status
Também tentei do Gerenciador de Pacotes Synaptic

uname -r 
4.10.0-22-generic

Eu também tentei limpar diferente de 4.10.0-22-genérico em / boot

    
por yathomasi1 20.06.2017 / 12:36

1 resposta

0

Apenas um espaço em 60-vboxdrv (copy).rules fez toda a edição

Eu verifiquei o seguinte erro

cp: cannot stat '/etc/udev/rules.d/60-vboxdrv': No such file or directory
cp: cannot stat '(copy).rules': No such file or directorye

e, em seguida, eu percebo que tinha feito uma cópia das regras um dia atrás e 60-vboxdrv.rules no diretório
/etc/udev/rules.d/ como 60-vboxdrv (copy).rules formulário nautilus (GUI) e lido como /etc/udev/rules.d/60-vboxdrv e (copy).rules devido ao espaço. Eu poderia apenas renomear e remover espaço, em vez disso, eu apaguei o arquivo e deixei o arquivo original.
Eu deveria ter verificado todos os erros muito bem.

    
por yathomasi1 22.06.2017 / 13:59