-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deb-package breaks apt/dpkg on dash-shell Linux OS #1227
Comments
this doesn't appear to be limited to just dash. i just ran into the same issue with version 1.27.2 on linux mint 21.3 with bash. all i did was install the .deb file, run the program to make sure it worked then tried to purge it.
the reason i tested it: https://forums.linuxmint.com/viewtopic.php?t=439536 |
Hi there! I'm the person who created the forum topic that user nZpUhsX linked. I'm just gonna copy the solution here just in case someone else sees this bug ticket before the issue is resolved. I revised ftb-app.postrm located in /var/lib/dpkg/info by changing the line ending option to "Unix/Linux" using the following command:
After that apt still didn't want to remove the package, but dpkg with the force argument was successful:
After that, I cleaned up the config files with:
And the package is totally gone! Using the following command returns 0 hits:
|
Hey all! Thanks for bringing this to our attention, we've done some digging, and we think we've found the issue with one of our deps for publishing. We've updated internally and are running some tests. We should have a new version up for tomorrow 👍 |
Might be a bit late if a solution was already found, just wanted to note that the same issue is present with the
Luckily this error doesn't break the update/uninstall process. Still looking forward to the fix 🙂 |
Thanks a lot to people investigating this so far. I also ran into this issue. The xed command did not work for me for some reason and I didn't quite understand the issue at first, so here is a quick explanation for anyone who is as confused by this at first as I was: The issue is that the line endings inside the script named "ftb-app.postrm" are Windows-style line endings, but should instead be Linux-style line endings. The following sed command exchanges the Windows line endings for Linux line endings, which resolved the issue for me and allowed me to uninstall the package - you need to be root for this:
|
What Operating System
Linux (Other)
Debug Code
https://pste.ch/abaligujen
Describe the bug
Installed from ftb-app-1.26.5-amd64.deb.
After installation the app runs, but apt/dpkg will set it as half-installed and continually error when installing or removing packages from that point on.
"dpkg (subprocess): unable to execute installed ftb-app package post-removal script (/var/lib/dpkg/info/ftb-app.postrm): No such file or directory
dpkg: error processing package ftb-app (--remove):
installed ftb-app package post-removal script subprocess returned error exit status 2
dpkg: too many errors, stopping
Errors were encountered while processing:
ftb-app
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
"
The package can not be removed or automatically fixed.
The cause of this, is that the postrm-script contains Windows-style line-endings, that mangle the bash commands for removing the app from /usr/bin.
In bash-proper this is ignored, in alternatives like dash, this breaks the script.
I understand that this affects a negligible amount of users, but it may be an easy fix.
The other scripts seem to use Unix line-endings, so I wonder why the postrm-script differs.
Could you please review the build-process and ensure that scripts are formatted for Unix.
Steps to reproduce
Expected behaviour
The app can be installed and removed at will, without corrupting the dpkg-state.
Screenshots
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: