dpkg Error Code 2

Questions about applications and software
Forum rules
Before you post please read this

dpkg Error Code 2

Postby Fanta206 on Thu Aug 09, 2012 11:10 am

I've tried searching for an answer to this error but there seems to be a diversity of causes and exact error messages. Basically I run...

Code: Select all
sudo apt-get update

Code: Select all
sudo apt-get updgrade


And am presented with the following information...

Code: Select all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  linux-generic linux-headers-generic linux-image-generic
The following packages will be upgraded:
  accountsservice cups cups-bsd cups-client cups-common cups-ppdc gir1.2-accountsservice-1.0 gir1.2-dbusmenu-glib-0.4 gir1.2-dbusmenu-gtk-0.4
  gir1.2-javascriptcoregtk-3.0 gir1.2-webkit-3.0 libaccountsservice0 libcups2 libcups2:i386 libcupscgi1 libcupsdriver1 libcupsimage2 libcupsimage2:i386
  libcupsmime1 libcupsppdc1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libdbusmenu-gtk4 libfreerdp-plugins-standard libfreerdp1 libjavascriptcoregtk-1.0-0
  libjavascriptcoregtk-3.0-0 libpython2.7 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libxslt1.1 libxslt1.1:i386
  linux-libc-dev python-problem-report python2.7 python2.7-minimal xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics
  xserver-xorg-input-vmmouse xserver-xorg-video-vmware
43 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/30.7 MB of archives.
After this operation, 95.2 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Extract templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 90%dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libopenal1:i386' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)


MintUpdate isn't working either with the same error code through the gui. Am I doing something wrong?
Fanta206
Level 1
Level 1
 
Posts: 9
Joined: Wed Jun 06, 2012 3:32 pm

Linux Mint is funded by ads and donations.
 

Re: dpkg Error Code 2

Postby viking777 on Thu Aug 09, 2012 11:24 am

Am I doing something wrong?


Don't think so.

Have you tried opening the package manager right clicking on libopenal1 and mark for reinstallation.

If that doesn't work you might try a full upgrade

Code: Select all
sudo apt-get update && sudo apt-get dist-upgrade


Which will include the kernel update as well. Possibly libopenal1 has been upgraded recently and is no longer working with the old kernel? (only a guess).
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: dpkg Error Code 2

Postby Fanta206 on Thu Aug 09, 2012 11:31 am

viking777 wrote:
Am I doing something wrong?


Don't think so.

Have you tried opening the package manager right clicking on libopenal1 and mark for reinstallation.

If that doesn't work you might try a full upgrade

Code: Select all
sudo apt-get update && sudo apt-get dist-upgrade


Which will include the kernel update as well. Possibly libopenal1 has been upgraded recently and is no longer working with the old kernel? (only a guess).


Thanks for suggestion however this has not worked. It downloaded kernel but still failed with same error code.

Code: Select all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed
  linux-headers-3.2.0-27 linux-headers-3.2.0-27-generic linux-image-3.2.0-27-generic
The following packages will be upgraded:
  accountsservice cups cups-bsd cups-client cups-common cups-ppdc gir1.2-accountsservice-1.0 gir1.2-dbusmenu-glib-0.4 gir1.2-dbusmenu-gtk-0.4
  gir1.2-javascriptcoregtk-3.0 gir1.2-webkit-3.0 libaccountsservice0 libcups2 libcups2:i386 libcupscgi1 libcupsdriver1 libcupsimage2 libcupsimage2:i386
  libcupsmime1 libcupsppdc1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libdbusmenu-gtk4 libfreerdp-plugins-standard libfreerdp1 libjavascriptcoregtk-1.0-0
  libjavascriptcoregtk-3.0-0 libpython2.7 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libxslt1.1 libxslt1.1:i386
  linux-generic linux-headers-generic linux-image-generic linux-libc-dev python-problem-report python2.7 python2.7-minimal xserver-xorg-core
  xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-vmmouse xserver-xorg-video-vmware
46 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 51.2 MB/81.9 MB of archives.
After this operation, 217 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com/ubuntu/ precise-updates/main linux-image-3.2.0-27-generic amd64 3.2.0-27.43 [38.5 MB]
Get:2 http://archive.ubuntu.com/ubuntu/ precise-updates/main linux-generic amd64 3.2.0.27.29 [1,708 B]                                                       
Get:3 http://archive.ubuntu.com/ubuntu/ precise-updates/main linux-image-generic amd64 3.2.0.27.29 [2,626 B]                                                 
Get:4 http://archive.ubuntu.com/ubuntu/ precise-updates/main linux-headers-3.2.0-27 all 3.2.0-27.43 [11.7 MB]                                               
Get:5 http://archive.ubuntu.com/ubuntu/ precise-updates/main linux-headers-3.2.0-27-generic amd64 3.2.0-27.43 [987 kB]                                       
Get:6 http://archive.ubuntu.com/ubuntu/ precise-updates/main linux-headers-generic amd64 3.2.0.27.29 [2,626 B]                                               
Fetched 51.2 MB in 59s (859 kB/s)                                                                                                                           
Extract templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 90%dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libopenal1:i386' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

Fanta206
Level 1
Level 1
 
Posts: 9
Joined: Wed Jun 06, 2012 3:32 pm

Re: dpkg Error Code 2

Postby viking777 on Thu Aug 09, 2012 1:18 pm

I offered two potential solutions in my reply. You obviously tried the second one, but not sure if you tried the first?

Can you confirm this before I tax my overworked brain any further :lol:
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: dpkg Error Code 2

Postby Fanta206 on Thu Aug 09, 2012 1:57 pm

viking777 wrote:I offered two potential solutions in my reply. You obviously tried the second one, but not sure if you tried the first?

Can you confirm this before I tax my overworked brain any further :lol:


Apologies Viking, I did try them both. I'm not near the machine now but if memory serves me correctly synaptic threw up the same error code.
Fanta206
Level 1
Level 1
 
Posts: 9
Joined: Wed Jun 06, 2012 3:32 pm

Re: dpkg Error Code 2

Postby viking777 on Thu Aug 09, 2012 2:28 pm

Ok my next shot is:

Code: Select all
sudo dpkg-reconfigure libopenal1


and if that doesn't work

Code: Select all
sudo dpkg-reconfigure --force libopenal1


Although forcing anything can lead to problems so only if you are brave/daft enough to try it out, your call not mine. (I would do it because it isn't working anyway, but that is just me).
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: dpkg Error Code 2

Postby Fanta206 on Thu Aug 30, 2012 10:40 pm

Sorry for the delay....

This still isn't working and I can't install any updates using any method. Whenever I try to update through terminal or update manager I keep getting error code 2 from /usr/bin/dpkg. For example...

Code: Select all
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  linux-generic linux-headers-generic linux-image-generic
The following packages will be upgraded:
  accountsservice aptdaemon aptdaemon-data base-files compiz compiz-core
  compiz-gnome compiz-plugins-default cups cups-bsd cups-client cups-common
  cups-ppdc dconf-gsettings-backend dconf-service firefox
  firefox-gnome-support firefox-locale-en fontconfig fontconfig-config
  fonts-opensymbol gcalctool gir1.2-accountsservice-1.0
  gir1.2-dbusmenu-glib-0.4 gir1.2-dbusmenu-gtk-0.4
  gir1.2-javascriptcoregtk-3.0 gir1.2-launchpad-integration-3.0
  gir1.2-webkit-3.0 gnome-settings-daemon icedtea-6-plugin icedtea-netx
  icedtea-netx-common icedtea-plugin imagemagick imagemagick-common
  jockey-common jockey-gtk language-pack-en language-pack-en-base
  language-pack-gnome-en language-pack-gnome-en-base libaccountsservice0
  libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libcups2
  libcups2:i386 libcupscgi1 libcupsdriver1 libcupsimage2 libcupsimage2:i386
  libcupsmime1 libcupsppdc1 libdbusmenu-glib4 libdbusmenu-gtk3-4
  libdbusmenu-gtk4 libdconf-dbus-1-0 libdconf0 libdecoration0 libexpat1
  libexpat1:i386 libfontconfig1 libfontconfig1:i386
  libfreerdp-plugins-standard libfreerdp1 libgl1-mesa-dri libgl1-mesa-dri:i386
  libgl1-mesa-glx libgl1-mesa-glx:i386 libglapi-mesa libglapi-mesa:i386
  libglu1-mesa libglu1-mesa:i386 libjavascriptcoregtk-1.0-0
  libjavascriptcoregtk-3.0-0 liblaunchpad-integration-3.0-1
  liblaunchpad-integration-common liblaunchpad-integration1
  liblaunchpad-integration1.0-cil libmagickcore4 libmagickcore4-extra
  libmagickwand4 libmission-control-plugins0 libnspr4 libnspr4:i386 libnss3
  libnss3:i386 libnss3-1d libnux-2.0-common libperl5.14 libpython2.7
  libreoffice-base libreoffice-base-core libreoffice-calc libreoffice-common
  libreoffice-core libreoffice-draw libreoffice-emailmerge libreoffice-gnome
  libreoffice-gtk libreoffice-help-en-us libreoffice-impress
  libreoffice-java-common libreoffice-math libreoffice-style-human
  libreoffice-style-tango libreoffice-writer libsqlite3-0 libsqlite3-0:i386
  libssl1.0.0 libssl1.0.0:i386 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common
  libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libxatracker1 libxslt1.1
  libxslt1.1:i386 linux-libc-dev mint-artwork-common mint-artwork-gnome
  mint-x-icons nux-tools openssl perl perl-base perl-modules python-aptdaemon
  python-aptdaemon.gtk3widgets python-aptdaemon.pkcompat python-gst0.10
  python-problem-report python-ubuntu-sso-client python-uno python2.7
  python2.7-minimal sessioninstaller thunderbird thunderbird-gnome-support
  tzdata tzdata-java uno-libs3 ure xserver-common xserver-xorg-core
  xserver-xorg-input-evdev xserver-xorg-input-synaptics
  xserver-xorg-input-vmmouse xserver-xorg-video-intel
  xserver-xorg-video-vmware
151 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/223 MB of archives.
After this operation, 8,684 kB disk space will be freed.
Do you want to continue [Y/n]? y
Extract templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 90%dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libopenal1:i386' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)


Edit: It should be noted that I did try to run an update to include the kernel also (which failed), when this error started happening.
Fanta206
Level 1
Level 1
 
Posts: 9
Joined: Wed Jun 06, 2012 3:32 pm

Re: dpkg Error Code 2

Postby Fanta206 on Thu Aug 30, 2012 10:57 pm

I seem to have fixed this issue...

I did this by simply deleting /var/lib/dpkg/info/libopenal1:i386.list (this seems to apply to anything, not just libopenal1:1386) name.list

Code: Select all
sudo rm /var/lib/dpkg/info/libopenal1:i386.list
sudo apt-get update
sudo apt-get upgrade

Worked a treat.
Fanta206
Level 1
Level 1
 
Posts: 9
Joined: Wed Jun 06, 2012 3:32 pm

Re: dpkg Error Code 2

Postby metalbolic on Thu Mar 21, 2013 2:49 pm

Fanta206 wrote:I seem to have fixed this issue...

I did this by simply deleting /var/lib/dpkg/info/libopenal1:i386.list (this seems to apply to anything, not just libopenal1:1386) name.list

Code: Select all
sudo rm /var/lib/dpkg/info/libopenal1:i386.list
sudo apt-get update
sudo apt-get upgrade

Worked a treat.


Thanks very so much, resolved my problem that I had for hours :P :P :P :P

edit: Not revolved, I mistake me :? :? :?
metalbolic
Level 1
Level 1
 
Posts: 3
Joined: Tue Mar 12, 2013 12:49 pm
Location: Salvador

Re: dpkg Error Code 2

Postby viking777 on Fri Mar 22, 2013 6:38 am

I haven't tried it myself, but I have heard of people with similar problems to this having success with renaming (or moving to recycle bin) the file /var/lib/apt/lists
then updating.

Try that.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: dafalk, Dyfi, GrahamBriggs and 13 guests