LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 04-16-2004, 07:15 PM   #1
Bookspoppa
LQ Newbie
 
Registered: Apr 2004
Posts: 6

Rep: Reputation: 0
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.
 
Old 04-16-2004, 09:11 PM   #2
CBlue
Member
 
Registered: Mar 2004
Location: South Carolina, USA
Distribution: Mepis
Posts: 287

Rep: Reputation: 30
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.
 
Old 04-17-2004, 04:02 AM   #3
Bookspoppa
LQ Newbie
 
Registered: Apr 2004
Posts: 6

Original Poster
Rep: Reputation: 0
thanks a lot. that worked.
 
Old 04-17-2004, 07:22 AM   #4
souljah
Member
 
Registered: Feb 2004
Location: New York City
Distribution: Debian
Posts: 97

Rep: Reputation: 15
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
 
Old 04-17-2004, 10:42 AM   #5
CBlue
Member
 
Registered: Mar 2004
Location: South Carolina, USA
Distribution: Mepis
Posts: 287

Rep: Reputation: 30
I love Sid though! It's fun!
 
Old 01-31-2008, 06:20 AM   #6
feral-deb
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 1
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.
 
Old 04-19-2008, 10:00 AM   #7
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 50
For new users, IMHO it's easier to go on with stable or testing instead of unstable.
 
Old 01-25-2009, 12:42 PM   #8
spinstartshere
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
Smile

Thank you, feral-deb. Your comment helped me with a somewhat chronic problem I was having with a package on Ubuntu.
 
Old 04-18-2009, 05:01 PM   #9
elaterite
LQ Newbie
 
Registered: Nov 2007
Location: Reno, NV
Distribution: Linux Mint 9 LTE KDE
Posts: 7

Rep: Reputation: 0
feral-deb you're a genius! Thanks!
 
Old 10-03-2009, 06:04 PM   #10
Trebour
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by feral-deb View Post
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
 
Old 11-11-2009, 11:51 PM   #11
riazrahaman
LQ Newbie
 
Registered: Oct 2004
Posts: 1

Rep: Reputation: 0
Thanks feral-deb, your instructions worked perfectly for me.
 
Old 11-12-2009, 01:48 AM   #12
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,113

Rep: Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104
Quote:
Originally Posted by feral-deb View Post
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
 
1 members found this post helpful.
Old 12-26-2009, 08:54 AM   #13
euromark
LQ Newbie
 
Registered: Dec 2009
Posts: 5

Rep: Reputation: 0
i made it worse

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
 
Old 12-27-2009, 06:28 PM   #14
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,113

Rep: Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104Reputation: 1104
Hi,

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:

Code:
sudo dpkg --remove libapache2-mod-php5 phpapi-20060613+lfs php5-cgi php5-gd php5-mysql phpmyadmin
Try experimenting with the list of packages to remove, until everything looks sane and 'dpkg --audit' returns nothing.

Evo2.
 
Old 12-28-2009, 10:32 AM   #15
euromark
LQ Newbie
 
Registered: Dec 2009
Posts: 5

Rep: Reputation: 0
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.
 
  


Reply


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
Sendmail returned error code 111 newlinuxgeek Linux - Software 1 02-14-2008 02:16 AM
dpkg returned an error code (1) Segmentation fault questionman Debian 6 11-02-2004 12:04 AM
Sub-process /bin/rpm returned an error code (255) during uninstall with synaptic DraaX Linux - Newbie 2 02-10-2004 02:05 AM
Synaptic error: "sub-process /usr/bin/dpkg returned an error code (2)" firefly2442 Linux - Software 3 02-04-2004 06:41 PM
The program returned an error code (3) Omega Linux - Software 1 05-04-2003 09:47 PM


All times are GMT -5. The time now is 10:36 AM.

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