Subprocess Post Installation Script Cydia

0514
  • Feb 10, 2018 - That issue is from the improper loading of Cydia sources and hosts. The old resolution was to re-run the utility up to a certain point and closing it.
  • 5 Search on 'Hierarchy' the application you want to uninstall, so in my case was 'MyWi' (without the quotes).
  1. Subprocess Post-installation Script Returned Error Exit Status 1

Feb 12, 2012 Error code 1 in cydia Discussion in 'iPhone Jailbreaking' started by iphone6, Feb 5, 2012. Subprocess post-installation script killed by signal cydia.

I went to install bsnes the other day and for whatever reason the installation failed. Now, I cannot update, install new packages, or do basically any apt-get commands as they all try to process this broken package and fail. Attempting to install a new package also just dooms it to the same fate. The error I get is:

I have been searching on Google and here on Ask Ubuntu but have not found a working solution. The commonly suggested fix is to run the following:

This however does not work. The apt-get commands all fail with the same error as above and the dpkg command just doesn't help. The other thing they often suggest to purge it via Synaptic or the command line, which also fails.

Thanks for the help

BijakBijak

8 Answers

For advanced users, use at your own risks.

According to the following error message :

You may want to edit /var/lib/dpkg/info/[package_name].postinst and comment everything (or better yet, try to understand it and identify the issue), then try apt-get again.

Note that though in this particular question the message concerns 'post-installation', it could have mentioned e.g. 'pre-removal' or 'post-removal' instead (in which cases the extension of the file to be edited would have been .prerm or .postrm).

Skippy le Grand GourouSkippy le Grand Gourou

Other than those which you have already posted, there are few other commands which can be helpful.

  • Autoclean clears out the local repository of retrieved package files.

  • Force installation/removal of packages. ☠Use with caution

    and

Also as always, you can use dpkg to install, remove and purge packages.

Post
  • Install

  • Remove

  • Purge

Registered UserRegistered User

So, after more googling and really carefully reading through the error messages again it seems that dpkg needed to be reinstalled.

What tipped off that this was the problem (if anyone searches and sees this) is that update-alternatives: not found was in the error message. As soon as dpkg was reinstalled, the other packages proceeded to install normally automatically.

BijakBijak

You can remove the package file in this /var/lib/dpkg/info/ path and update the source.

Then, reinstall your package sudo apt-get install [package_name]

HamedHamed

If all else fails. What I did was I first changed the directory to:

then I removed everything with .postinst:

then update repository

then everything went back to normal when I did:

Mike BMike B

If all else fails, you can manually remove the package through dpkg. Running sudo dpkg -P bsnes should purge bsnes.

saiarcot895saiarcot895

In my case apt-get install -f worked. I was installing mysql-workbench-community

Previously tried apt autoclean

I saw that dpkg error due to some missing dependencies which could be corrected by installing in forced mode( installing dependencies)

Vikas AvnishVikas Avnish

After running above, you can install/upgrade/remove/purge as usual for any packages.

Uddhav GautamUddhav Gautam

protected by CommunityOct 1 '17 at 19:25

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged package-managementdpkgaptitude or ask your own question.

Error

Subprocess Post-installation Script Returned Error Exit Status 1

I've seen this message several times whenever someone has a problem installing, upgrading or removing some piece of software, but I wonder, what does it mean, and more importantly, is possible to solve it?

(the above is just an example, not my actual problem)

Braiam
BraiamBraiam

1 Answer

That message is generic. It just means that the dpkg instance called by apt/apt-get failed for some reason. It doesn't explain why, how, or give hints how to solve it. As a diagnostic message, it is not useful.

You need to read the lines before the message (sometimes quite a number of them) to find the real error that prevents you from completing the installation.

Yeah, but how do I solve it?

There is no single way to solve it. There are so many reasons why this can happen that it's futile to attempt to list them all in a single post. Each and every circumstance is almost unique to that package/environment.

But, there's redemption. The fact that you see this message means that probably there is more relevant information in the lines before the message. For illustrative purposes I will use a example:

Now, to find the problem, you need to read backwards:

  • E: Sub-process /usr/bin/dpkg returned an error code (1) doesn't tell me anything useful. So moving on.
  • Errors were encountered while processing: mongodb-10gen just tells me what package have problems. Is useful but not enough.
  • subprocess installed post-installation script returned error exit status 100: this tells me that the script that failed was the postinst, the one executed in post-installation. This will come handy in some situations, but not in this one.
  • dpkg: error while cleaning up: nothing useful here.
  • invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. BINGO! This tells us that invoke-rc.d, a binary that controls the init script in most Debian-like system, failed. It failed because it couldn't find the /etc/init.d/mongodb script. This is bad. We need to create it or copy from somewhere else so it starts working again. Reinstalling the package is also normally an option for file not found errors.

    In this case, reporting a bug is not necessary because is probable that we were the ones that removed the script, but if you are completely sure you didn't touch the file (a debsums -sla should confirm it) then report a bug.

So, what exactly do you need to get help? Ideally, the complete output of the problem. It's also helpful to include the output of sudo dpkg -C and sudo apt-get check, and the output of apt-cache policy package1 package2... where 'package1 package2 ...' includes all the packages with problems.

BraiamBraiam

protected by CommunityJan 27 '15 at 7:57

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged aptdpkg or ask your own question.

This entry was posted on 5/14/2019.