0

I was trying to install libmemcached-dev for php, and I encountered an error:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

Then I typed the sudo dpkg --configure -a, on the first try it gives an internal error and said that to report it. Then I tried it again(3-4 times): sudo dpkg --configure -a, and my laptop always goes hang. And before it goes completely unresponsive, luckily the print screen works and here is the text:

[sudo] password for japjap:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
japjap@laptop:~$ sudo dpkg --configure -a
Setting up linux-image-4.4.0-47-generic (4.4.0-47.68) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-4.4.0-47-generic
) points to /boot/initrd.img-4.4.0-47-generic
 (/boot/initrd.img-4.4.0-47-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-47-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-4.4.0-47-generic
) points to /boot/vmlinuz-4.4.0-47-generic
 (/boot/vmlinuz-4.4.0-47-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-47-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-47-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic

Anybody can help how I can solve this? I can't install anything.

First 20 lines of my /etc/default/grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

Update:

df -h

Filesystem      Size  Used Avail Use% Mounted on
udev            946M     0  946M   0% /dev
tmpfs           194M  6.2M  187M   4% /run
/dev/sda1       228G  8.9G  207G   5% /
tmpfs           966M  536K  965M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           966M     0  966M   0% /sys/fs/cgroup
tmpfs           194M   64K  193M   1% /run/user/1000

lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0   231G  0 part /
├─sda2   8:2    0     1K  0 part 
└─sda5   8:5    0     2G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom  

sudo blkid

/dev/sda1: UUID="6416ac0d-4822-47aa-9035-a3fadf5033b2" TYPE="ext4" PARTUUID="118168b7-01"
/dev/sda5: UUID="437c42c7-26b8-4fb9-8fd7-10267ba9276a" TYPE="swap" PARTUUID="118168b7-05"

cat /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=6416ac0d-4822-47aa-9035-a3fadf5033b2 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdb5 during installation
UUID=437c42c7-26b8-4fb9-8fd7-10267ba9276a none            swap    sw              0       0

Update:

free

              total        used        free      shared  buff/cache   available
Mem:        1976820      860788       80364      140768     1035668      766212
Swap:       2024444        2508     2021936

sudo apt-get autoclean
[sudo] password for japjap: 
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the download directory
  • In terminal, give me the answer to uname -r. – heynnema Nov 12 '16 at 16:35
  • @heynnema 4.4.0-45-generic – Dumb Question Nov 13 '16 at 4:38
0

You're having driver issues.

Boot with the nomodeset grub option.

To perform this from the Grub Menu hit e on the ubuntu option. Then add the nomodeset parameter to the line that says, quiet splash. After the edit hit F10 to boot.

Then edit the /etc/default/grub file and add this argument to the boot defaults.

Change from:

# For full documentation of the options in this file, see:                                                                          
#   info -f grub -n 'Simple configuration'                                                                                          

GRUB_DEFAULT="saved"
GRUB_SAVEDEFAULT="true"
#GRUB_HIDDEN_TIMEOUT="0"                                                                                                            
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="10"
GRUB_RECORDFAIL_TIMEOUT="$GRUB_TIMEOUT"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change to:

# For full documentation of the options in this file, see:                                                                          
#   info -f grub -n 'Simple configuration'                                                                                          

GRUB_DEFAULT="saved"
GRUB_SAVEDEFAULT="true"
#GRUB_HIDDEN_TIMEOUT="0"                                                                                                            
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="10"
GRUB_RECORDFAIL_TIMEOUT="$GRUB_TIMEOUT"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

The only line to be concerned with is the one highlighted in bold.

Editor examples

Use your favorite edit to edit the file. These are examples to edit the file:

$ sudo nano /etc/default/grub

or

$ sudo pksudo gedit /etc/default/grub

After making the change update your grub with:

$ sudo update-grub
$ sudo update-grub

This will resolve your laptop's lockup (due to hardware and drivers conflict) and allow you to complete the sudo dpkg --configure -a command you're having problems with.

  • I tried this info -f grub -n, this is the result info: option requires an argument -- 'n' Try --help for more information. – Dumb Question Nov 12 '16 at 13:48
  • Should I restart my computer and press e ? – Dumb Question Nov 12 '16 at 13:50
  • The block of information you are looking at is referring to contents in a file that needs to be changed. You can edit the file with this command: sudo nano /etc/default/grub. Save the changes and continue with what is provided in the answer. – L. D. James Nov 12 '16 at 13:52
  • Hello, it's been awhile and still hangs here is the screen shot imgur.com/a/Ylvem – Dumb Question Nov 12 '16 at 14:37
  • @DumbQuestion Will you edit your question and show the content (at least the first 20 lines of your /etc/default/grub file? I'm sure the problem lies there. – L. D. James Nov 12 '16 at 15:42
0

It looks like a Software Update failed, and left you partially updated. We'll try and fix this the short way...

From the Unity dashboard, start Synaptic. Go to the edit menu and choose Fix broken packages. Quit Synaptic.

update: If you can't use Synaptic, do this:

  1. boot the system to the GRUB menu
  2. choose Advanced Options
  3. choose Recovery mode
  4. choose dpkg - fix broken packages
  5. when you return to the menu, choose root access
  6. type reboot
  7. once rebooted, open terminal, type sudo dpkg --configure -a
  8. whether step 7 works or not, perform commands 1-5, below

From the Unity dashboard, start terminal. Enter the following commands, one at a time (best to use copy and paste):

sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
sudo apt-get -f install
sudo apt-get upgrade
  • I do not have synaptic only synaptic_synaptic.png – Dumb Question Nov 14 '16 at 1:13
  • In terminal, type sudo apt-get install synaptic – heynnema Nov 14 '16 at 1:23
  • ps: if for some reason it errors when you try to install Synaptic, just go ahead with the other steps. – heynnema Nov 14 '16 at 1:30
  • this image appears again imgur.com/a/XXb7W and my laptop goes very sluggish until I turn off it again. – Dumb Question Nov 14 '16 at 3:02
  • How much RAM? How much swap? Edit your question to include the output, in terminal, of df -h and lsblkand sudo blkid and cat /etc/fstab. Were you able to run Synaptic and fix broken packages? Go ahead and try and run steps 2-5. Please answer all my questions, and give all requested output. Report back. – heynnema Nov 14 '16 at 4:25

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.