Sudo, erro DPKG

0

Quando tentei remover o dpkg lock por este comando:

$ sudo rm /var/lib/dpkg/lock

e correu

    $ sudo dpkg --configure -a
    Setting up xserver-common (2:1.18.4-0ubuntu0.3) ...
    Setting up python3-pil:amd64 (3.1.2-0ubuntu1.1) ...
    Processing triggers for gconf2 (3.2.6-3ubuntu6) ...
    Setting up poppler-utils (0.41.0-0ubuntu1.2) ...
    Setting up xul-ext-ubufox (3.4-0ubuntu0.16.04.1) ...
    Processing triggers for ureadahead (0.100.0-19) ...
    Setting up linux-libc-dev:amd64 (4.4.0-93.116) ...
    Setting up oxideqt-codecs:amd64 (1.21.5-0ubuntu0.16.04.1) ...
    Setting up thunderbird (1:52.2.1+build1-0ubuntu0.16.04.1) ...
    Setting up shotwell-common (0.22.0+git20160108.r1.f2fb1f7-0ubuntu1.1) ...
    Processing triggers for libc-bin (2.23-0ubuntu9) ...
    Setting up thunderbird-gnome-support (1:52.2.1+build1-0ubuntu0.16.04.1) ...
    Processing triggers for systemd (229-4ubuntu16) ...
    Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
    ^[[A^[[A^[[B^[[B^[[C^[[C^[[D^[[DSetting up linux-headers-4.10.0-33 (4.10.0-33.37~16.04.1) ...
    Setting up xserver-xorg-core-hwe-16.04 (2:1.18.4-1ubuntu6.1~16.04.2) ...
    Setting up python3-jwt (1.3.0-1ubuntu0.1) ...
    Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ...
    Setting up linux-image-4.10.0-33-generic (4.10.0-33.37~16.04.1) ...
    Running depmod
    ^[[A^[[Bupdate-initramfs: deferring update (hook will be called later)
    initrd.img(/boot/initrd.img-4.10.0-33-generic
    ) points to /boot/initrd.img-4.10.0-33-generic
     (/boot/initrd.img-4.10.0-33-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.10.0-33-generic.postinst line 491.
    vmlinuz(/boot/vmlinuz-4.10.0-33-generic
    ) points to /boot/vmlinuz-4.10.0-33-generic
     (/boot/vmlinuz-4.10.0-33-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.10.0-33-generic.postinst line 491.
    Examining /etc/kernel/postinst.d.
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    update-initramfs: Generating /boot/initrd.img-4.10.0-33-generic
    W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_01.bin for module i915
    run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/update-notifier 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
    run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
    Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.10.0-33-generic.postinst line 1052.
    dpkg: error processing package linux-image-4.10.0-33-generic (--configure):
     subprocess installed post-installation script returned error exit status 2
    Setting up evince (3.18.2-1ubuntu4.1) ...
    Setting up apport-gtk (2.20.1-0ubuntu2.10) ...
    Setting up thunderbird-locale-en (1:52.2.1+build1-0ubuntu0.16.04.1) ...
    Setting up shotwell (0.22.0+git20160108.r1.f2fb1f7-0ubuntu1.1) ...
    Setting up linux-headers-4.10.0-33-generic (4.10.0-33.37~16.04.1) ...
    Examining /etc/kernel/header_postinst.d.
    run-parts: executing /etc/kernel/header_postinst.d/dkms 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    Setting up thunderbird-locale-en-us (1:52.2.1+build1-0ubuntu0.16.04.1) ...
    dpkg: dependency problems prevent configuration of linux-image-extra-4.10.0-33-generic:
     linux-image-extra-4.10.0-33-generic depends on linux-image-4.10.0-33-generic; however:
      Package linux-image-4.10.0-33-generic is not configured yet.

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

    dpkg: error processing package linux-image-generic-hwe-16.04 (--configure):
     dependency problems - leaving unconfigured
    Setting up linux-headers-generic-hwe-16.04 (4.10.0.33.35) ...
    dpkg: dependency problems prevent configuration of linux-generic-hwe-16.04:
     linux-generic-hwe-16.04 depends on linux-image-generic-hwe-16.04 (= 4.10.0.33.35); however:
      Package linux-image-generic-hwe-16.04 is not configured yet.

    dpkg: error processing package linux-generic-hwe-16.04 (--configure):
     dependency problems - leaving unconfigured
    Setting up libnss3-nssdb (2:3.28.4-0ubuntu0.16.04.2) ...
    Setting up libreoffice-common (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Installing new version of config file /etc/bash_completion.d/libreoffice.sh ...
    Setting up libnss3:amd64 (2:3.28.4-0ubuntu0.16.04.2) ...
    Setting up libreoffice-core (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up python3-uno (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-pdfimport (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-gtk (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-draw (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-avmedia-backend-gstreamer (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-style-galaxy (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up liboxideqtcore0:amd64 (1.21.5-0ubuntu0.16.04.1) ...
    Setting up libreoffice-impress (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-math (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-base-core (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-calc (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up liboxideqtquick0:amd64 (1.21.5-0ubuntu0.16.04.1) ...
    Setting up libreoffice-style-breeze (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-gnome (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up liboxideqt-qmlplugin:amd64 (1.21.5-0ubuntu0.16.04.1) ...
    Setting up libreoffice-ogltrans (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Setting up libreoffice-writer (1:5.1.6~rc2-0ubuntu1~xenial2) ...
    Processing triggers for libc-bin (2.23-0ubuntu9) ...
    Errors were encountered while processing:
     linux-image-4.10.0-33-generic
     linux-image-extra-4.10.0-33-generic
     linux-image-generic-hwe-16.04
     linux-generic-hwe-16.04

e, em seguida, tentei instalar o Adapta GTK Theme, a saída que obtive foi:

    $ sudo apt-get install adapta-gtk-themeReading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following additional packages will be installed:
      gtk2-engines-pixbuf libgail-common libgail18 libgtk2.0-0 libgtk2.0-bin
    The following NEW packages will be installed:
      adapta-gtk-theme gtk2-engines-pixbuf
    The following packages will be upgraded:
      libgail-common libgail18 libgtk2.0-0 libgtk2.0-bin
    4 upgraded, 2 newly installed, 0 to remove and 191 not upgraded.
    4 not fully installed or removed.
    Need to get 2,646 kB of archives.
    After this operation, 17.8 MB of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Get:1 http://ppa.launchpad.net/tista/adapta/ubuntu xenial/main amd64 adapta-gtk-theme all 3.91.2.129-0ubuntu1~xenial1 [717 kB]
    Get:2 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgtk2.0-bin amd64 2.24.30-1ubuntu1.16.04.2 [9,834 B]
    Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgail-common amd64 2.24.30-1ubuntu1.16.04.2 [112 kB]
    Get:4 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgail18 amd64 2.24.30-1ubuntu1.16.04.2 [14.2 kB]
    Get:5 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgtk2.0-0 amd64 2.24.30-1ubuntu1.16.04.2 [1,775 kB]
    Get:6 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 gtk2-engines-pixbuf amd64 2.24.30-1ubuntu1.16.04.2 [19.0 kB]
    Fetched 2,646 kB in 2min 32s (17.3 kB/s)                                       
    debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
    (Reading database ... 215009 files and directories currently installed.)
    Preparing to unpack .../libgtk2.0-bin_2.24.30-1ubuntu1.16.04.2_amd64.deb ...
    Unpacking libgtk2.0-bin (2.24.30-1ubuntu1.16.04.2) over (2.24.30-1ubuntu1) ...
    Preparing to unpack .../libgail-common_2.24.30-1ubuntu1.16.04.2_amd64.deb ...
    Unpacking libgail-common:amd64 (2.24.30-1ubuntu1.16.04.2) over (2.24.30-1ubuntu1) ...
    Preparing to unpack .../libgail18_2.24.30-1ubuntu1.16.04.2_amd64.deb ...
    Unpacking libgail18:amd64 (2.24.30-1ubuntu1.16.04.2) over (2.24.30-1ubuntu1) ...
    Preparing to unpack .../libgtk2.0-0_2.24.30-1ubuntu1.16.04.2_amd64.deb ...
    Unpacking libgtk2.0-0:amd64 (2.24.30-1ubuntu1.16.04.2) over (2.24.30-1ubuntu1) ...
    Selecting previously unselected package gtk2-engines-pixbuf:amd64.
    Preparing to unpack .../gtk2-engines-pixbuf_2.24.30-1ubuntu1.16.04.2_amd64.deb ...
    Unpacking gtk2-engines-pixbuf:amd64 (2.24.30-1ubuntu1.16.04.2) ...
    Selecting previously unselected package adapta-gtk-theme.
    Preparing to unpack .../adapta-gtk-theme_3.91.2.129-0ubuntu1~xenial1_all.deb ...
    Unpacking adapta-gtk-theme (3.91.2.129-0ubuntu1~xenial1) ...
    Processing triggers for man-db (2.7.5-1) ...
    Processing triggers for libc-bin (2.23-0ubuntu9) ...
    Setting up linux-image-4.10.0-33-generic (4.10.0-33.37~16.04.1) ...
    Running depmod.
    update-initramfs: deferring update (hook will be called later)
    initrd.img(/boot/initrd.img-4.10.0-33-generic
    ) points to /boot/initrd.img-4.10.0-33-generic
     (/boot/initrd.img-4.10.0-33-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.10.0-33-generic.postinst line 491.
    vmlinuz(/boot/vmlinuz-4.10.0-33-generic
    ) points to /boot/vmlinuz-4.10.0-33-generic
     (/boot/vmlinuz-4.10.0-33-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.10.0-33-generic.postinst line 491.
    Examining /etc/kernel/postinst.d.
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    update-initramfs: Generating /boot/initrd.img-4.10.0-33-generic
    W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_01.bin for module i915
    run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/update-notifier 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
    debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
    run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
    Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.10.0-33-generic.postinst line 1052.
    dpkg: error processing package linux-image-4.10.0-33-generic (--configure):
     subprocess installed post-installation script returned error exit status 2
    dpkg: dependency problems prevent configuration of linux-image-extra-4.10.0-33-generic:
     linux-image-extra-4.10.0-33-generic depends on linux-image-4.10.0-33-generic; however:
      Package linux-image-4.10.0-33-generic is not configured yet.

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

    dpkg: error processing package linux-image-generic-hwe-16.04 (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of linux-generic-hwe-16.04:
     linux-generic-hwe-16.04 depends on linux-image-generic-hwe-16No 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
            .04 (= 4.10.0.33.35); however:
      Package linux-image-generic-hwe-16.04 is not configured yet.

    dpkg: error processing package linux-generic-hwe-16.04 (--configure):
     dependency problems - leaving unconfigured
    Setting up libgtk2.0-0:amd64 (2.24.30-1ubuntu1.16.04.2) ...
    Setting up libgtk2.0-bin (2.24.30-1ubuntu1.16.04.2) ...
    Setting up libgail18:amd64 (2.24.30-1ubuntu1.16.04.2) ...
    Setting up libgail-common:amd64 (2.24.30-1ubuntu1.16.04.2) ...
    Setting up gtk2-engines-pixbuf:amd64 (2.24.30-1ubuntu1.16.04.2) ...
    Setting up adapta-gtk-theme (3.91.2.129-0ubuntu1~xenial1) ...
    Processing triggers for libc-bin (2.23-0ubuntu9) ...
    Errors were encountered while processing:
     linux-image-4.10.0-33-generic
     linux-image-extra-4.10.0-33-generic
     linux-image-generic-hwe-16.04
     linux-generic-hwe-16.04
    E: Sub-process /usr/bin/dpkg returned an error code (1)

O que devo fazer ??

    
por Harshul Vijay 02.09.2017 / 09:07

1 resposta

0

O erro aponta para as imagens do Linux não serem configuradas corretamente (o que é irônico, já que é isso que o comando deve corrigir)

Eu sugiro que você reinstale esses pacotes com sudo apt install --reinstall linux-image-4.10.0-33-generic linux-image-extra-4.10.0-33-generic linux-image-generic-hwe-16.04 linux-generic-hwe-16.04

Espero que isso ajude

    
por Matthew Jeppesen 02.09.2017 / 17:11