LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-10-2011, 01:57 PM   #1
Sipps123
LQ Newbie
 
Registered: Oct 2010
Posts: 4

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


Get this error whenever I try to install something. Get the same error when I try and remove xrdp. Any tips on how to fix this would be much appreciated.


Code:
root@gnarwhale:/home/matt/Desktop/fuse-2.8.6/example/vfsproj# apt-get install dpkg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
dpkg is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up xrdp (0.5.0~20100303cvs-6ubuntu2) ...
groupadd: cannot lock /etc/gshadow; try again later.
adduser: `/usr/sbin/groupadd -g 129 xrdp' returned error code 10. Exiting.
dpkg: error processing xrdp (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 xrdp
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
Old 12-10-2011, 03:59 PM   #2
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 258

Rep: Reputation: 42
You tried to install dpkg which is installed by default during Linux installation and it is the most recent version. But somewhere in the past you did two things that are not complete. One was to either add a user or add a user to a certain group, then when trying to install xrdp it borked because part of the installation requires making user group changes which cannot be done as there are incomplete user group processes lingering.
This article may be the ticket.
 
Old 12-10-2011, 09:43 PM   #3
Sipps123
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you for your help brains. I know about dpkg, just needed an example. I read the article that you sent, did the steps, but it was not successful. Some odd behavior I encountered, when I looked for hanging user/group adds I found them, but could not kill them, with the following happening.

Code:
root@gnarwhale:/home/matt# ps -ef | grep useradd
root      3969  2427  0 22:39 pts/2    00:00:00 grep --color=auto useradd
root@gnarwhale:/home/matt# ps -ef | grep groupadd
root      3971  2427  0 22:40 pts/2    00:00:00 grep --color=auto groupadd
root@gnarwhale:/home/matt# kill 3971
bash: kill: (3971) - No such process
root@gnarwhale:/home/matt# kill 3969
bash: kill: (3969) - No such process
root@gnarwhale:/home/matt#
Any other suggestions? Do you know what the problem is with xrdp?

- Thanks
 
Old 12-11-2011, 11:11 PM   #4
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 258

Rep: Reputation: 42
I'm just going by that article, not experience.

Something I've learned many moons ago was to use an option in the kill command, not sure how it came about but I always use: kill -9 PID, PID being the process.
Have you checked in /etc to see if any of those files exist?
I have a smooth operating Debian and those lock files do not exist, (passwd.lock, group.lock and gshadow.lock). If one or all those files exist, then this is more than likely what you need to do.
I checked and I also have those two processes, useradd and groupadd, they don't show up when I do a: ps -aux, but do show with the ps -ef.

Also, for all three of those files, I have in /etc/ three versions, example:
gshadow
gshadow-
gshadow.bak

It is also possible the "cannot lock /etc/gshadow" error arrises due to the file not existing, if so, might be worth trying to create a blank file by that name with command: touch /etc/gshadow
 
  


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
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) Skullnick Linux - Software 2 01-30-2010 11:27 AM
E: Sub-process /usr/bin/dpkg returned an error code (1) shogun1234 Linux - Software 1 05-17-2008 09:03 AM
Sub-process /usr/bin/dpkg returned an error code (1) rapattack Debian 10 04-24-2008 11:19 PM


All times are GMT -5. The time now is 03:28 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