LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-10-2012, 05:15 PM   #1
immer
LQ Newbie
 
Registered: Oct 2003
Location: Somewhere in Europe :-)
Distribution: Linux Mint
Posts: 29

Rep: Reputation: 15
Exclamation apt-get: Sub-process /usr/bin/dpkg returned an error code


Hello.

I have some problems with apt-get. After doing some basic test on my Linux Mint 9 LTS desktop on bacula and mysql my apt-get upgrade process failed.


Code:
tobik ~ # LANG=en_US.UTF-8 uname -a
Linux tobik 2.6.32-35-generic-pae #78-Ubuntu SMP Tue Oct 11 17:01:12 UTC 2011 i686 GNU/Linux

tobik ~ # LANG=en_US.UTF-8 apt-get -y upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  linux-generic linux-generic-pae linux-headers-generic linux-image-generic linux-image-generic-pae
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up bacula-director-mysql (5.0.1-1ubuntu1) ...
debconf: Unknown template field '_description', in stanza #9 of /var/lib/dpkg/info/bacula-director-mysql.templates

.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error processing bacula-director-mysql (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
bacula-director-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)

tobik ~ # LANG=en_US.UTF-8 dpkg --configure --pending
Setting up bacula-director-mysql (5.0.1-1ubuntu1) ...
debconf: Unknown template field '_description', in stanza #9 of /var/lib/dpkg/info/bacula-director-mysql.templates

.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error processing bacula-director-mysql (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
bacula-director-mysql

tobik ~ # LANG=en_US.UTF-8 apt-get purge bacula-director-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bacula-common-mysql bacula-director-common bacula-common
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  bacula-director-mysql*
0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 864kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 177497 files and directories currently installed.)
Removing bacula-director-mysql ...
.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error processing bacula-director-mysql (--purge):
subprocess installed pre-removal script returned error exit status 2
debconf: Unknown template field '_description', in stanza #9 of /var/lib/dpkg/info/bacula-director-mysql.templates

.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
bacula-director-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)

tobik ~ # LANG=en_US.UTF-8 apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bacula-common-mysql bacula-director-mysql bacula-director-common bacula-common
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up bacula-director-mysql (5.0.1-1ubuntu1) ...
debconf: Unknown template field '_description', in stanza #9 of /var/lib/dpkg/info/bacula-director-mysql.templates

.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error processing bacula-director-mysql (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
bacula-director-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)

tobik ~ # LANG=en_US.UTF-8 apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  bacula-common bacula-common-mysql bacula-director-common bacula-director-mysql
0 upgraded, 0 newly installed, 4 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 2,765kB disk space will be freed.
Do you want to continue [Y/n]? 
(Reading database ... 177497 files and directories currently installed.)
Removing bacula-director-mysql ...
.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error processing bacula-director-mysql (--remove):
subprocess installed pre-removal script returned error exit status 2
debconf: Unknown template field '_description', in stanza #9 of /var/lib/dpkg/info/bacula-director-mysql.templates

.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Removing bacula-director-common ...
Removing bacula-common-mysql ...
Removing bacula-common ...
Processing triggers for ureadahead ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for man-db ...
Errors were encountered while processing:
bacula-director-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'd like to get rid of the problem - be able to upgrade the system.
It would be best to uninstall all the packages related to bacula and MySQL, along with the configuration. After that, I could play with them again after reinstalling.
 
Old 05-10-2012, 05:56 PM   #2
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,587

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Are you doing a plain upgrade or a dist-upgrade (a newer versions of Linux Mint)? If you are doing a plain upgrade try
Code:
aptitude update
aptitude safe-upgrade
let us know how you go.
 
Old 05-11-2012, 01:55 PM   #3
immer
LQ Newbie
 
Registered: Oct 2003
Location: Somewhere in Europe :-)
Distribution: Linux Mint
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by k3lt01 View Post
Are you doing a plain upgrade or a dist-upgrade (a newer versions of Linux Mint)? If you are doing a plain upgrade try
Code:
aptitude update
aptitude safe-upgrade
let us know how you go.
I'm not going to do an "dist-upgrade". I don't want to upgrade to Linux Mint 10, 11 or 12. I just want to upgrade all packages to newer available versions in scope of Linux Mint 9. I want to do it the way I do until now every few days:
Code:
apt-get update && apt-get -y upgrade
I don't have "safe-upgrade" option in my aptitude.
Code:
tobik ~ # LANG=en_US.UTF8 aptitude --version
aptitude 0.4.11.11 compiled at Oct 20 2011 13:35:11
Compiler: g++ 4.4.3
Compiled against:
  apt version 4.8.0
  NCurses version 5.7
  libsigc++ version: 2.2.4.2
  Ept support enabled.

Current library versions:
  NCurses version: ncurses 5.7.20090803
  cwidget version: 0.5.13
  Apt version: 4.8.0

tobik ~ # LANG=en_US.UTF8 apt-get --version
apt 0.7.25.3ubuntu9.10 for i386 compiled on Mar  5 2012 16:43:41
Supported modules:
*Ver: Standard .deb
*Pkg:  Debian dpkg interface (Priority 30)
 S.L: 'deb' Standard Debian binary tree
 S.L: 'deb-src' Standard Debian source tree
 Idx: Debian Source Index
 Idx: Debian Package Index
 Idx: Debian Translation Index
 Idx: Debian dpkg status file
 
Old 05-11-2012, 02:06 PM   #4
immer
LQ Newbie
 
Registered: Oct 2003
Location: Somewhere in Europe :-)
Distribution: Linux Mint
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by immer View Post
I don't have "safe-upgrade" option in my aptitude.
Errata. I have this option (previously, I looked at aptitude manual in my native language, which turns out to be outdated).

Output:
Code:
tobik ~ # LANG=en_US.UTF8 aptitude safe-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Resolving dependencies...
Resolving dependencies...
The following NEW packages will be installed:
  linux-headers-2.6.32-41{a} linux-headers-2.6.32-41-generic{a} linux-image-2.6.32-41-generic{a} 
  linux-image-2.6.32-41-generic-pae{a} 
The following packages will be REMOVED:
  bacula-director-mysql{u} 
The following packages will be upgraded:
  linux-generic linux-generic-pae linux-headers-generic linux-image-generic linux-image-generic-pae 
5 packages upgraded, 4 newly installed, 1 to remove and 0 not upgraded.
Need to get 74.1MB of archives. After unpacking 284MB will be used.
Do you want to continue? [Y/n/?] 
Writing extended state information... Done
Get:1 http://archive.ubuntu.com/ubuntu/ lucid-updates/main linux-image-2.6.32-41-generic 2.6.32-41.88 [31.6MB]
Get:2 http://archive.ubuntu.com/ubuntu/ lucid-updates/main linux-image-2.6.32-41-generic-pae 2.6.32-41.88 [31.7MB]
Get:3 http://archive.ubuntu.com/ubuntu/ lucid-updates/main linux-generic 2.6.32.41.48 [4,888B]                    
Get:4 http://archive.ubuntu.com/ubuntu/ lucid-updates/main linux-image-generic 2.6.32.41.48 [4,896B]              
Get:5 http://archive.ubuntu.com/ubuntu/ lucid-updates/main linux-generic-pae 2.6.32.41.48 [4,894B]                
Get:6 http://archive.ubuntu.com/ubuntu/ lucid-updates/main linux-image-generic-pae 2.6.32.41.48 [4,906B]          
Get:7 http://archive.ubuntu.com/ubuntu/ lucid-updates/main linux-headers-2.6.32-41 2.6.32-41.88 [9,942kB]         
Get:8 http://archive.ubuntu.com/ubuntu/ lucid-updates/main linux-headers-2.6.32-41-generic 2.6.32-41.88 [797kB]   
Get:9 http://archive.ubuntu.com/ubuntu/ lucid-updates/main linux-headers-generic 2.6.32.41.48 [4,886B]            
Fetched 74.1MB in 1min 48s (684kB/s)                                                                              
(Reading database ... 177340 files and directories currently installed.)
Removing bacula-director-mysql ...
.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error processing bacula-director-mysql (--remove):
 subprocess installed pre-removal script returned error exit status 2
debconf: Unknown template field '_description', in stanza #9 of /var/lib/dpkg/info/bacula-director-mysql.templates

.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 bacula-director-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Writing extended state information... Done
 
Old 05-11-2012, 08:09 PM   #5
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,587

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Do you need mysql for anything else? It may be that you will need to check for orphaned packages and then reinstall the packages you need.
 
Old 05-12-2012, 01:15 AM   #6
immer
LQ Newbie
 
Registered: Oct 2003
Location: Somewhere in Europe :-)
Distribution: Linux Mint
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by k3lt01 View Post
Do you need mysql for anything else? It may be that you will need to check for orphaned packages and then reinstall the packages you need.
I don't need mysql for any other package. Look at my first post please. Uninstall orphaned packages also leads to errors.
 
Old 05-12-2012, 01:57 AM   #7
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,587

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Quote:
Originally Posted by immer View Post
I don't need mysql for any other package.
Good then remove it and start again if need be.
Code:
aptitude purge bacula
aptitude purge mysql
#Remove any orphaned packages at this point#
aptitude update
aptitude safe-upgrade
Quote:
Originally Posted by immer View Post
Look at my first post please.
I looked at your first post before I typed the first reply. Have you upgraded the system? Did you remove mysql and bacula?
Quote:
Originally Posted by immer View Post
Uninstall orphaned packages also leads to errors.
Does it? that's interesting. Orphaned packages aren't required by anything, that is why they are orphaned, so removing them should not create any problems.
 
Old 05-12-2012, 03:56 AM   #8
immer
LQ Newbie
 
Registered: Oct 2003
Location: Somewhere in Europe :-)
Distribution: Linux Mint
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by k3lt01 View Post
Good then remove it and start again if need be.
Code:
aptitude purge bacula
aptitude purge mysql
#Remove any orphaned packages at this point#
aptitude update
aptitude safe-upgrade
I looked at your first post before I typed the first reply. Have you upgraded the system? Did you remove mysql and bacula?
Does it? that's interesting. Orphaned packages aren't required by anything, that is why they are orphaned, so removing them should not create any problems.

Sorry, I've been sure that `apt-get autoremove`, listed at first post, removes orhpaned packages.
After all, I'm stuck at first step:
Code:
tobik ~ # LANG=en_US.UTF-8 aptitude purge bacula
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Writing extended state information... Done
The following packages will be REMOVED:
  bacula-director-mysql{u} 
0 packages upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
Need to get 0B of archives. After unpacking 864kB will be freed.
Do you want to continue? [Y/n/?] 
Writing extended state information... Done
(Reading database ... 177340 files and directories currently installed.)
Removing bacula-director-mysql ...
.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error processing bacula-director-mysql (--remove):
 subprocess installed pre-removal script returned error exit status 2
debconf: Unknown template field '_description', in stanza #9 of /var/lib/dpkg/info/bacula-director-mysql.templates

.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 bacula-director-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Code:
tobik ~ # LANG=en_US.UTF-8 aptitude purge mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
The following packages will be REMOVED:
  bacula-director-mysql{u} mysql-server{p} mysql-server-5.1{u} mysql-server-core-5.1{u} 
0 packages upgraded, 0 newly installed, 4 to remove and 6 not upgraded.
Need to get 0B of archives. After unpacking 28.0MB will be freed.
Do you want to continue? [Y/n/?] 
Writing extended state information... Done
(Reading database ... 177340 files and directories currently installed.)
Removing bacula-director-mysql ...
.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error processing bacula-director-mysql (--remove):
 subprocess installed pre-removal script returned error exit status 2
debconf: Unknown template field '_description', in stanza #9 of /var/lib/dpkg/info/bacula-director-mysql.templates

.: 12: Can't open /usr/share/dbconfig-common/internal/mysql
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 bacula-director-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
 
Old 05-12-2012, 04:34 AM   #9
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,587

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
I need a break, lol. Sorry I've had a crappy week and didn't take it all in even though I did read it.

Ok in
Code:
/var/lib/dpkg/info/
you need to find the files it mentions in the errors, delete them (only the ones it mentions), apt-get or aptitude should work for you after that so you can purge those packages and then do your upgrade.
 
Old 06-09-2012, 05:00 PM   #10
dlsmith
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Rep: Reputation: Disabled
I'm having very similar problem, trying to reinstall LibreOffice...running Pangolin.

I keep getting the following:
"Errors were encountered while processing:
/var/cache/apt/archives/libreoffice-common_1%3a3.5.3-0ubuntu1_all.deb
E: sub-process /usr/bin/dpkg returned an error code (1)"

Attempted resolutions:
-deleted from the archive file the line: "libreoffice-common_1%...etc" with no change.
-have run apt-get update
-have run apt-get install -f
-have rebooted...and, not running another terminal window or synaptic.
 
Old 06-10-2012, 05:46 PM   #11
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,587

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
dlsmith, is that the whole error message? You see the OPs message has alot more information to it so if you can give us more we may be able to help better.
 
Old 06-11-2012, 12:16 PM   #12
dlsmith
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Rep: Reputation: Disabled
[RESOLVED] error message

Quote:
Originally Posted by k3lt01 View Post
dlsmith, is that the whole error message? You see the OPs message has alot more information to it so if you can give us more we may be able to help better.
Thnx, after my third attempt, where I attacked the errant file via Synaptic instead of via a terminal window, I finally was able to delete the .deb file cited in the error message...and then the reinstall went fine.

Appreciate yr reply.
David
 
Old 06-11-2012, 02:47 PM   #13
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,587

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Well done, it's good you worked through it.
 
  


Reply

Tags
apt-get, dpkg, upgrade


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
E: Sub-process /usr/bin/dpkg returned an error code (1) benjaminosis Linux - Newbie 1 03-09-2012 07:21 PM
E: Sub-process /usr/bin/dpkg returned an error code (1) Sipps123 Linux - Newbie 3 12-11-2011 11:11 PM
E: Sub-process /usr/bin/dpkg returned an error code (1) cmontr Linux - Virtualization and Cloud 4 05-27-2011 07:23 PM
E: Sub-process /usr/bin/dpkg returned an error code (1) ashwani.sahni Ubuntu 1 05-14-2010 08:43 AM
Sub-process /usr/bin/dpkg returned an error code (1) adrian1979 Debian 1 11-12-2006 09:14 PM


All times are GMT -5. The time now is 08:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration