You are Unregistered, please register to gain Full access.    

Go Back   SiNfuL iPhone > Discussion | Help > App | Game | Software - Discussion & Help > Cydia Apps Discussion

Notices

Cydia Apps Discussion Discussion & Help for all Cydia Apps.

Reply
Thread Tools

 Cydia problem: "Sub-process /usr/bin/dpkg returned an error code (2)".
Unread 07-27-2011, 08:57 AM   #1
psywzrd
n00b
 
psywzrd is offline
Join Date: Dec 2009
Device: iPhone 4
iOS Version: 4.3
iTunes Version: iTunes 10
Carrier: AT&T
OS: Mac OS X
Location: confused
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Cydia problem: "Sub-process /usr/bin/dpkg returned an error code (2)".

I have ultrasn0w installed strictly to fix the one signal strength bar issue on my ip4 (on AT&T with 4.3.3 & 1.59.00 bb) and I frequently run into problems with it when one of my Cydia apps needs updating. When I try to update an app(s), ultrasn0w gets reinstalled even though it's already installed and not in the queue. When that happens I get an error that says "Sub-process /usr/bin/dpkg returned an error code (2)". Sometimes when I go to update an app I get the same error message without the ultrasn0w reinstall happening.

I did some research and thought I found a fix, which was the following:

Solution:
1- Get your way to the file and directory structure of your iPhone (through SSH or iFile or Mobile Terminal ...)
2- Look for the /var/lib/dpkg/ directory
3- You should be able to find the following files: available, availble-old, status, status-old
4- Rename "available" to "available-bak"
5- Rename "status" to "status-bak"
6- Rename "available-old" to "available"
7- Rename "status-old" to "status"
8- Start Cydia , make sure that you allow Cydia to load completely first (just to be on the safe side ), try to install some apps.

I've fixed this problem several times now but it keeps coming back. I'm not sure if it's related to ultrasn0w or not but it seems like ultrasn0w might be stuck in the queue or something. I don't know if I need to do a complete reinstall of Cydia or if there's a way to just rebuild the Cydia databases but I don't know what to do at this point. It seems like every time I try to update an app or something this error comes back and it's the same error every time. Is there an easy way for me to uninstall Cydia and then reinstall it without having to re-jb and start over? I'm so desperate at this point.

Please help!!!
  Reply With Quote

 
Unread 07-27-2011, 09:29 AM   #2
tom21
Obsessive iPhone Disorder
 
tom21's Avatar
 
tom21 is offline
Join Date: Nov 2010
Device: iPhone 4
iOS Version: 5.1.1
iTunes Version: iTunes 10
Carrier: AT&T
OS: Windows 7
Location:  
Posts: 2,734
Thanks: 450
Thanked 1,866 Times in 1,016 Posts
It could be missing a key that Cydia needs. Try reinstalling all the dependencies that Cydia needed, and then reinstall Cydia.
I'm forever busy to be sober. Resident drunk lurking with Budweiser.
  Reply With Quote

 
Unread 07-27-2011, 09:34 AM   #3
psywzrd
n00b
 
psywzrd is offline
Join Date: Dec 2009
Device: iPhone 4
iOS Version: 4.3
iTunes Version: iTunes 10
Carrier: AT&T
OS: Mac OS X
Location: confused
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by tom21 View Post
It could be missing a key that Cydia needs. Try reinstalling all the dependencies that Cydia needed, and then reinstall Cydia.
How do I do this?
  Reply With Quote

 
Unread 07-27-2011, 09:38 AM   #4
tom21
Obsessive iPhone Disorder
 
tom21's Avatar
 
tom21 is offline
Join Date: Nov 2010
Device: iPhone 4
iOS Version: 5.1.1
iTunes Version: iTunes 10
Carrier: AT&T
OS: Windows 7
Location:  
Posts: 2,734
Thanks: 450
Thanked 1,866 Times in 1,016 Posts
Beside that, try running these commands in terminal before reinstalling Cydia.

Continue configuring
Quote:
dpkg --configure -a
Erase existing available info
Quote:
dpkg --clear-avail
I'm forever busy to be sober. Resident drunk lurking with Budweiser.
  Reply With Quote

 
Unread 07-27-2011, 09:43 AM   #5
psywzrd
n00b
 
psywzrd is offline
Join Date: Dec 2009
Device: iPhone 4
iOS Version: 4.3
iTunes Version: iTunes 10
Carrier: AT&T
OS: Mac OS X
Location: confused
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by tom21 View Post
Beside that, try running these commands in terminal before reinstalling Cydia.

Continue configuring


Erase existing available info
I swear I'm not usually this helpless but I can't even find mobileterminal on my phone. According to Cydia it's installed but there's no icon for it and searching comes up empty.
  Reply With Quote

 
Unread 07-27-2011, 09:47 AM   #6
tom21
Obsessive iPhone Disorder
 
tom21's Avatar
 
tom21 is offline
Join Date: Nov 2010
Device: iPhone 4
iOS Version: 5.1.1
iTunes Version: iTunes 10
Carrier: AT&T
OS: Windows 7
Location:  
Posts: 2,734
Thanks: 450
Thanked 1,866 Times in 1,016 Posts
Quote:
Originally Posted by psywzrd View Post
How do I do this?
Use the search feature within Cydia to search for "Cydia Installer" without quotes. Or reinstall via terminal.

The following are the required dependencies.

Pre-Depends: debianutils

Depends: apr-lib, apt7-lib, apt7-key, cydia-lproj, darwintools, debianutils, org.thebigboss.repo.icons, pcre, sed, shell-cmds, system-cmds, uikittools (>= 1.1.0)
I'm forever busy to be sober. Resident drunk lurking with Budweiser.
  Reply With Quote

 
Unread 07-27-2011, 09:50 AM   #7
psywzrd
n00b
 
psywzrd is offline
Join Date: Dec 2009
Device: iPhone 4
iOS Version: 4.3
iTunes Version: iTunes 10
Carrier: AT&T
OS: Mac OS X
Location: confused
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by tom21 View Post
Use the search feature within Cydia to search for "Cydia Installer" without quotes. Or reinstall via terminal.

The following are the required dependencies.

Pre-Depends: debianutils

Depends: apr-lib, apt7-lib, apt7-key, cydia-lproj, darwintools, debianutils, org.thebigboss.repo.icons, pcre, sed, shell-cmds, system-cmds, uikittools (>= 1.1.0)
The problem with that is that I can't install, reinstall or remove anything in Cydia right now due to the error I'm receiving (the one in my original post). And I can't even "fix" it in ifile right now because the available-old and status-old files are missing.
  Reply With Quote

 
Unread 07-27-2011, 10:13 AM   #8
tom21
Obsessive iPhone Disorder
 
tom21's Avatar
 
tom21 is offline
Join Date: Nov 2010
Device: iPhone 4
iOS Version: 5.1.1
iTunes Version: iTunes 10
Carrier: AT&T
OS: Windows 7
Location:  
Posts: 2,734
Thanks: 450
Thanked 1,866 Times in 1,016 Posts
You need to find a way to get your mobile terminal back because you can perform a force installation via terminal. Try downloading from this site http://code.google.com/p/mobileterminal/downloads/list, either drop it to Cydia App Install "/var/root/Media/Cydia/AutoInstall" or use iFile to install, and then reboot iPhone.
I'm forever busy to be sober. Resident drunk lurking with Budweiser.
  Reply With Quote

 
Unread 07-27-2011, 12:25 PM   #9
psywzrd
n00b
 
psywzrd is offline
Join Date: Dec 2009
Device: iPhone 4
iOS Version: 4.3
iTunes Version: iTunes 10
Carrier: AT&T
OS: Mac OS X
Location: confused
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
No matter what I try to do, it seems like I run into a roadblock. I copied the deb file to the directory you specified (I had to create that directory though because it did not exist on my phone already), rebooted, ran Cydia and nothing. Then I tried to install it manually via ifile and got the following message:

Error executing command: /usr/bin/dkpg -' "/var/mobile/Documents/MobileTerminal_520-1_iphoneos-arm.deb"

dpkg: parse error, in file '/var/lib/dkpg/status' near line 1940" invalid package name (character '\' not allowed (only letters, digits and characters '-+._'))

Finished with Result Code: 512


WTF?!
  Reply With Quote

 
Unread 07-27-2011, 01:13 PM   #10
tom21
Obsessive iPhone Disorder
 
tom21's Avatar
 
tom21 is offline
Join Date: Nov 2010
Device: iPhone 4
iOS Version: 5.1.1
iTunes Version: iTunes 10
Carrier: AT&T
OS: Windows 7
Location:  
Posts: 2,734
Thanks: 450
Thanked 1,866 Times in 1,016 Posts
Use iFunbox navigating to this "/var/lib/dkpg/" directory, copy that status file to your desktop, open status file with notepad or notepad++, go to line 1940 and post that line here. And I found error code 512 via Google is related to permission issue but I could be wrong too.

---------- EDIT ----------

Oh yeah, please read through this thread The Answer to 95% of Your Cydia Problems - SiNfuL iPhone to assist you further.
I'm forever busy to be sober. Resident drunk lurking with Budweiser.
  Reply With Quote

 
Unread 07-27-2011, 02:47 PM   #11
psywzrd
n00b
 
psywzrd is offline
Join Date: Dec 2009
Device: iPhone 4
iOS Version: 4.3
iTunes Version: iTunes 10
Carrier: AT&T
OS: Mac OS X
Location: confused
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
I decided to try re-jailbreaking my phone because I'm having way too many problems with it. If I continue to have this same problem after I'm done setting everything up again, I'll post back here to try to get some more help. Thank you so much for your time!!!
  Reply With Quote

 
Unread 11-04-2011, 08:32 PM   #12
psywzrd
n00b
 
psywzrd is offline
Join Date: Dec 2009
Device: iPhone 4
iOS Version: 4.3
iTunes Version: iTunes 10
Carrier: AT&T
OS: Mac OS X
Location: confused
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Just wanted to post back and say that this has been working ok for me now.
  Reply With Quote

 
Unread 06-12-2013, 03:08 PM   #13
landyachtzz
n00b
 
landyachtzz is offline
Join Date: Jun 2013
Device: iPhone 5
iOS Version: 6.1.2
iTunes Version: iTunes 11
Carrier: Verizon
OS: Mac OS X
Location: Delaware
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Icon4

i have this problem, i have rebooted my device, i have done the iFile shit, i have removed sketchy repos and still have this damn problem. is their anyway too fix it i really do not want to restore and this is annoying as a tick on a hound dog with a stiff neck
  Reply With Quote

 sub-process
Unread 01-21-2014, 10:15 AM   #14
Dove7777
n00b
 
Dove7777 is offline
Join Date: Jun 2011
Device: iPad 2
iOS Version: 3.1.3
iTunes Version: iTunes 10
Carrier: Other
OS: Mac OS X
Location: Massachusetts
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
sub-process

Sub-process/usr/bin/dpkg returned an error code (2)
  Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off




All times are GMT -7. The time now is 10:45 PM.

Copyright 2009 (SiNfulSS)- Shot Caller @ SiNfuL iPhone