Sub-Process /usr/bin/dpkg returned an error code (1)
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sub-Process /usr/bin/dpkg returned an error code (1)
I just installed Debian, and I am upgrading to unstable. When I do the command apt-get upgrade I recieve the an error saying Sub-Process /usr/bin/dpkg returned an error code (1).
this is the the screen leading up to the error:
Preparing to replace console-common 0.7.38 (using .../console-common_0.7.40_all.deb) ...
dpkg: error processing /var/cache/apt/archives/console-common_0.7.40_all.deb (--unpack):
subprocess pre-installation script returned error exit status 9
Loading /etc/console/boottime.kmap.gz
Preparing to replace libkrb53 1.3.2-2 (using .../libkrb53_1.3.3-1_i386.deb) ...
Unpacking replacement libkrb53
Preparing to replace libpam-runtime 0.76-16 (using .../libpam-runtime_0.76-19_all.deb) ...
Unpacking replacement libpam-runtime ...
Errors were encountered while processing:
/var/cache/apt/archives/console-common_0.7.40_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I am a newbie, so please be specific in your reply. Thanks a lot for your help in advance.
After you get that error, try apt-get -f install to force an install of the files that didn't get loaded because of the error. Then try apt-get upgrade again, apt-get -f install back and forth until only the package that has the error is left.
If you are going to be using debian unstable (sid) it is inherently necessary to read the manpage for dpkg and apt-get. This was just a small taste of what can go wrong with sid
I had a similar problem and what i found that worked for me was going into /var/lib/dpkg/info and deleting everything that had that name and you may also have to go into /var/cache/apt/archives and do the same thing. I'm fairly new to linux so if this breaks anything i am sorry. i haven't run into any problems yet that this has caused.
I had a similar problem and what i found that worked for me was going into /var/lib/dpkg/info and deleting everything that had that name and you may also have to go into /var/cache/apt/archives and do the same thing. I'm fairly new to linux so if this breaks anything i am sorry. i haven't run into any problems yet that this has caused.
Dude you helped me out big time i was tring to install torrentflux-b4rt and got same error after using your clean up help it installed perfectly many thanks
I had a similar problem and what i found that worked for me was going into /var/lib/dpkg/info and deleting everything that had that name
You deleted the pre and post install scripts. This can very easily mean that the package will not be installed properly, and it won't be removed properly if you choose to uninstall it. It is THE WRONG THING to do.
Using 'apt-get -f install' and/or 'dpkg --configure --pending' are what you should do. If your problems persist, try to read and understand the .postinst script for the problematic package and check for bugs reported against that packge. Failing that, ask for help and/or report a bug.
If you are running sid, you should be prepared to do these sorts of things.
Quote:
and you may also have to go into /var/cache/apt/archives and do the same thing. I'm fairly new to linux so if this breaks anything i am sorry. i haven't run into any problems yet that this has caused.
This is where the .deb files that apt downloads are put, after installation, you can delete them, but you should do it with the command 'apt-get clean'.
Evo2.
Last edited by evo2; 11-12-2009 at 01:56 AM.
Reason: Typo
after having the same problem as stated in the original post i used "feral-deb"s tip to delete those 2 directories
which some time later was rated inappropriate from "evo2" - too late for me...
since then i cannot proceed with "apt-get install" or even the -f force way.
it always halts with the following error code:
Code:
6 not fully removed or installed
...
Setting up libapache2-mod-php5 (5.2.4-2ubuntu5.7) ...
dpkg: error processing libapache2-mod-php5 (--configure):
subprocess post-installation script returned error exit status 10
Setting up php5-cgi (5.2.4-2ubuntu5.7) ...
dpkg: error processing php5-cgi (--configure):
subprocess post-installation script returned error exit status 10
dpkg: dependency problems prevent configuration of php5:
php5 depends on libapache2-mod-php5 (>= 5.2.4-2ubuntu5.7) | php5-cgi (>= 5.2.4-2ubuntu5.7); however:
Package libapache2-mod-php5 is not configured yet.
Package php5-cgi is not configured yet.
dpkg: error processing php5 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-gd:
php5-gd depends on phpapi-20060613+lfs; however:
Package phpapi-20060613+lfs is not installed.
Package libapache2-mod-php5 which provides phpapi-20060613+lfs is not configured yet.
Package php5-cgi which provides phpapi-20060613+lfs is not configured yet.
dpkg: error processing php5-gd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-mysql:
php5-mysql depends on phpapi-20060613+lfs; however:
Package phpapi-20060613+lfs is not installed.
Package libapache2-mod-php5 which provides phpapi-20060613+lfs is not configured yet.
Package php5-cgi which provides phpapi-20060613+lfs is not configured yet.
dpkg: error processing php5-mysql (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of phpmyadmin:
phpmyadmin depends on libapache2-mod-php5 | libapache-mod-php5 | php5-cgi | php5 | libapache2-mod-php4 | libapache-mod-php4 | php4 | php4-cgi; however:
Package libapache2-mod-php5 is not configured yet.
Package libapache-mod-php5 is not installed.
Package php5-cgi is not configured yet.
Package php5 is not configured yet.
Package libapache2-mod-php4 is not installed.
Package libapache-mod-php4 is not installed.
Package php4 is not installed.
Package php4-cgi is not installed.
phpmyadmin depends on php5-mysql | php5-mysqli | php4-mysql; however:
Package php5-mysql is not configured yet.
Package php5-mysqli is not installed.
Package php4-mysql is not installed.
dpkg: error processing phpmyadmin (--configure):
dependency problems - leaving unconfigured
...
Errors were encountered while processing:
libapache2-mod-php5
php5-cgi
php5
php5-gd
php5-mysql
phpmyadmin
Sub-process /usr/bin/dpkg returned an error code (1)
no matter what i try to do
dpkg --configure --pending
does not work either
i am stuck
ok, first off '-f' does not mean "force" it is "fix broken". As for deleting files: deleteing files in /var/cache/apt/archives should not be a problem. Deleting things in /var/lib/dpkg/info on the other hand could be, however I'm assuming you did not delete everything, just the scripts for some specific packages.
Anyway it seems that the problematic packages are all non critical apache related. You may simply be able to remove them and reinstall them. If this approach seems ok to you then please try:
as this server is productive right now (running a little website) i might have to wait for the weekend here
i guess reinstalling those packages will make the website unavailable for a while
i was hoping on a fix that would enable me to just update the existing packages. but after screwing up by deleting the complete content of /var/lib/dpkg/info i probably will have to take your advice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.