LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-16-2008, 06:39 PM   #1
shogun1234
Member
 
Registered: May 2004
Posts: 167

Rep: Reputation: 15
E: Sub-process /usr/bin/dpkg returned an error code (1)


I try to remove wesnoth-server package by using 'apt-get remove wesnoth-server'; but it fails. Then I searched on the forum regarding to this error message. Many people suggest either use apt-get -f install or dpkg --force-overwrite to eliminate this error; unfortunately, none of them work on my case.

when invoking the apt-get -f install it generates error
Code:
invoke-rc.d: initscript wesnoth-server, action "stop" failed
I search around in the /etc folder, finding out that there is a script called wesnoth-server located in the /etc/init.d/ dir; and is linked to different runlevel (e.g., rc2.d, etc.). I check the start-stop-daemon by command `which start-stop-daemon` with nothing returns. I believe the problem should be the incomplete state that apt-get record of wesnoth-server, in which related binary files has been removed but the record still exists in its package database. However, I have no idea where this record is located. Maybe I can edit it manually. Or how should I solve this problem?

I appreciate any suggestion.

Thank you very much.
 
Old 05-17-2008, 09:03 AM   #2
shogun1234
Member
 
Registered: May 2004
Posts: 167

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by shogun1234 View Post
I try to remove wesnoth-server package by using 'apt-get remove wesnoth-server'; but it fails. Then I searched on the forum regarding to this error message. Many people suggest either use apt-get -f install or dpkg --force-overwrite to eliminate this error; unfortunately, none of them work on my case.

when invoking the apt-get -f install it generates error
Code:
invoke-rc.d: initscript wesnoth-server, action "stop" failed
I search around in the /etc folder, finding out that there is a script called wesnoth-server located in the /etc/init.d/ dir; and is linked to different runlevel (e.g., rc2.d, etc.). I check the start-stop-daemon by command `which start-stop-daemon` with nothing returns. I believe the problem should be the incomplete state that apt-get record of wesnoth-server, in which related binary files has been removed but the record still exists in its package database. However, I have no idea where this record is located. Maybe I can edit it manually. Or how should I solve this problem?

I appreciate any suggestion.

Thank you very much.

I think I found a solution (though might not be a good way). The problem cause this is error is from the place I am doubt of it. Because the installation calls the script wesnoth-server.prerm, located in the /var/lib/dpkg/info, to stop the wesnoth server first, in which the start-stop-daemon does not exists (no idea why). First I forcly install dpkg by extracting package and copy files to appropriate location (/sbin/start-stop-daemon), but it did not work. So I mark up the script which calls 'invokerc.d ...' and '/init.d/wesnoth-server' in wesnoth-server.prerm. Then do `apt-get remove wesnoth-server` again. Then this package is removed correctly.
 
  


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
Sub-Process /usr/bin/dpkg returned an error code (1) Bookspoppa Debian 39 11-12-2013 01:21 PM
Input/Output Error; dpkg sub-process /usr/bin/dpkg returned and error code (2) NosLycn Linux - Software 7 12-12-2011 02:50 AM
Sub-process /usr/bin/dpkg returned an error code kako13 Debian 2 05-15-2008 06:01 PM
Sub-process /usr/bin/dpkg returned an error code (1) rapattack Debian 10 04-24-2008 11:19 PM
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:43 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