crouton: Method http has died unexpectedly during software installation
name: precise
encrypted: yes, locked
Unmounting /media/removable/SD/chroots/precise...
name: trusty
encrypted: yes, locked
Unmounting /media/removable/SD/chroots/trusty...
Please describe your issue:
I have an Acer Chromebook R11, running stable channel Chrome 51. I had no problems installing precise and installing additional software. Last week, I wanted to install trusty and always got the mentioned error after crouton was installing software for a while. Tried several times with -u and from scratch. No chance. I tried a different mirror, but that did not help either. This week, crouton was able to install trusty with no errors, using the default mirror. However, when I try to install some packages (for example mesa-utils) inside xfce4 (shell window), I get that error again. So, I logged out of xfce4 and started chroot console only and there I can install everything.
If known, describe the steps to reproduce the issue:
Install trusty enter-chroot -n trusty startxfce4 start shell window apt-get install mesa-utils
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 144 (3 by maintainers)
advice to remove files in
has worked for me.
Wanted to share my workaround, along with a minor discovery, in the hope of being helpful. š
I keep a pristine copy of the
httpbinary in my home directory, and I have a separate directory where I archive corrupted versions. I have a script in my home directory, containing the following:Whenever I run into the issue, I just run this script, and I have a working system again, along with a copy of the damaged
httpbinary, named according to the current date.I have now collected 9 such damaged binaries. Today, I was curious to compare them, and I noticed that two of them were identical:
As you can see, the versions from April 5th and June 12th share the same checksum - which at least demonstrates that the corruption is not entirely random.
If this issue starts bugging me enough, I might start running a watchdog process to continuously (maybe once per minute) compare the current checksum of the systemās
httpbinary with the most recent checksum captured, and save the new version with a timestamp if it differs. Itād be interesting to see if thereās any discernible pattern as to how and when the file is being modified.Anyway, hope this may prove helpful or enlightening, and/or be a step toward an eventual resolution. š
Side note: Iām kind of impressed this issue is still so active after more than two years with no consistent solution or identifiable root cause
I keep commonly running into this issue, so Iāll throw my fix into the mix:
I used to be able to get rid of the apt segfaulting by: OLD WAY:
reboot
HOWEVER: This stop working for me recently ĀÆ\_(ć)_/ĀÆ
WHAT DID WORK:
sudo dpkg -i apt_1.0.1ubuntu2.17_amd64.debsudo dpkg -i apt_1.2.15ubuntu0.2_amd64.debInstalling the old version may be unnecessary and I plan to update this next time this happens to me with the result of attempting without the old install first.
Itās so annoying that this issue keeps happening. I would say 1/8 of my apt related activities causes the seg fault for all subsequent apt calls and I have to do some crazy fix.
Update: Newest working method:
reboot
UPDATE 2: after you have a working http/https. following @mrpnelson 's solution below worked BEAUTIFULLY for me. No reboot needed! Though you should modify the script and inital cp to also cp the https proc as well since that one fails randomly in the exact same way http does for me.
I started experiencing this issue today after having used a Xenial chroot for about 3 weeks. This Stack Overflow answer has fixed my issue, at least for now.
https://unix.stackexchange.com/a/320991
@orangganjil Iāve just retried the update, and it succeeded, so I put
sources.listback to its stock configuration and the problem reappeared! Swapping the configuration back to my xmission based one fixes it again, so as far as I can tell, I have a reliable solution here.EDIT 1: And now after a reboot and re-entry to the chroot, the symptom is back again! Now no amount of fiddling with
sources.listhelps. I guess it was nice while it lastedā¦EDIT 2: Iāve just blown away my Ubuntu Xenial chroot and re-created it fresh ā not from backups! ā and the symptom reappears. I assume from this that the problem is not something broken locally, which I can easily fix myself. Since āsignal 4ā is āillegal instruction,ā as pointed out above, I wonder if the chroot is interacting badly with some Chrome OS security thing.
EDIT 3: Iāve built a new chroot using Debian Stretch, and it appears to have solved the problem. Iāll report back if it starts throwing errors again.
I got it working again, but I am not sure why it works. Here is what I did:
Went to http://packages.ubuntu.com/trusty/amd64/apt/download Downloaded apt_1.0.1ubuntu2.13_amd64.deb sudo dpkg -i apt_1.0.1ubuntu2.13_amd64.deb Was warned about a downgrade from 1.0.1ubuntu2.14 apt-get works again
For some reason 1.0.1ubuntu2.14 seems to be broken.
Sad to see this issue closed, if only due to nostalgia. Five and a half years later, and the bug has never been solved. Unsatisfying, but whatcha gonna do? Thank you, @dnschneid, for this weird and awesome piece of software.
RE: encryption
I always install a new chroot without encryption, set everything up the way I want it and then encrypt it with an update afterwards, e.g. -
sudo crouton -e -u [-n chrootname]This seems to work best for me and may just help with this issue too.
Hope this helps, -DennisLfromGA
Hi, guys. I deleted my Xenial cheroot and was running Debian Stretch happily for a while. I wanted to install Atom and followed these instructions: https://flight-manual.atom.io/getting-started/sections/installing-atom/#platform-linux
THIS COMMAND is the one that brought that happiness to a screeching and bloody halt: sudo sh -c āecho ādeb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any mainā > /etc/apt/sources.list.d/atom.listā
Something about fooling with sources.list.d screws everything up. I immediately threw a seg fault when updating. I added the repository to my /etc/apt/sources.list and updated just fine ( after logging out of the cheroot and restarting my Chromebook ).
THE PROBLEM HAS SOMETHING TO DO WITH sources.list.d. Does that make any sense?
Hi, I just reinstalled a new chroot using this information that I just found ( Iām an idiot. ): https://github.com/dnschneid/crouton/issues/4026.
I no longer have the segmentation/sig 4 problem when I enter-chroot. I can update and install packages with no problems. But when I actually startxfce4 and enter the DE, nothing works. Ever. It used to work if I kept trying. Now it just quits.
Iām using an Acer 14, CB3-431 with 4GB and 32GB.
Does anyone have any ideas or fixes? Is anyone still checking here?
Thanks,
Rich
This bug is the reason I do not run crouton on my C302. Iād be grateful to anyone who took the time to dive in and understand what is causing this!
I am seeing this on internal storage on Asus C302
thanks @spwg - the HTTPS needed altered in my sources to fix things and let me update again. Not sure how bad a security risk that is, but maybe others can shed light on issue more. ( xenial on Acer 571 )
I had this issue for a week, and this link helped me figure it out: https://askubuntu.com/questions/104160/method-driver-usr-lib-apt-methods-https-could-not-be-found-update-error.
At the command line, run
cd /etc/apt/sources.list.d && cat * | grep https. If that command doesnāt return clean, then go change every āhttpsā to āhttpā in the files under/etc/apt/sources.list.d.A reasonable workaround for me was to enter the chroot, and then create a backup copy of the http method file (/usr/lib/apt/methods/http in xenial) to /usr/local/lib/apt/methods/http-backup. Generally on first entering the chroot itās fine. Test apt (e.g. update) at this point, to ensure the file you copied was good.
With a working reference file, you can then alias a command or write a script to replace the http method as needed. E.g., I made the following script in /usr/local/sbin/fixapt:
Then, if apt starts failing,
sudo fixaptcan resolve quickly. As/when that shared object is updated, itās likely youāll need to make periodic updates to your backup copy. At the very least, hopefully this approach helps prevent some more time-intensive workaround approaches.I have only installed crouton today on a new samsung 2in1 510. Initally it worked fine, but then I ran into the problem described so well by everyone above, apt-get fails via http not working. The solution I arrived at is not permanent, but assumes that repeated corruption is a āfeatureā of this kind of setup. I had to do much of this with a non-working apt and relied on hints given by many in the previous postings.
It appears that there is an ongoing corruption happening and it happens in use. Donāt expect this to fix it for more than a few moments. From my brief experience itās not necessary to reinstall crouton, restart or reboot. your experience may vary, but so far this is working for me.
edit: Iāve combined the above steps into a bash script so it only takes one sudoād command to get back into a good state. So far this has solved the issue on a case by case basis and has the added benefit of keeping the system up to date.
Iām running xenial on a samsung chromebook pro, having this issue as well:
Iām a huge noob, especially with linux. What worked for me, at least temporarily:
Edit: I spoke too soon. Donāt do this. It fixed the error message, but broke all my dependencies.
I went here, and downloaded every .deb file for version 1.5.1 and amd64. I dumped them into a folder, cdāed into it, and ran:
Despite the dependency errors, apt-get seems to work now. Shotgun approach worked out. For now.
Edit: never mind. My shitās all broken.
Yes, I am not on crouton, not on Chrome Book and
/etc/apt/sources.list.d/resolved my issue.So, it is not Crouton specificā¦
I am quite concerned as to what could have caused the issue. I noticed it after power outage on my Raspberry PI 3 running standard raspbian.
Unfortunately I run into a bucket of issues. sshd failed to start with segmentation fault and it was at the top of my list. Removing and installing sshd did not help. There were no additional error messages. Just a segmentation fault. Nginx httpd seems to have failed to start as well, but at that moment it was after sshd on my list. According to logs tt-rss application was failing to start as well, but it was of lowest priority.
Eventually I decided to update OS and thatās when I run into this issues at apt-get level.
I run into problem running:
I fixed it somehow and then I run into issue running
Given a cascade of issues I have started to doubt the health of the file system, but I had no fsck issues.
So, at the moment I have 2 theories:
Both suspects are scary.
I had no issues until now maintaining headless raspberry PI and I have a 2nd one that has shown no issues.
Short Update
I have restored root file system from known good tar backup and have no issues. I have hardened
sshd.Removing files in
/etc/apt/sources.list.d/is going to remove additional repositories, Opera and Dropbox in my case. Thatās not good for me. Besides the issue is intermittent for me.Iām on the beta channel on an R11 with 4MB RAM (itās a German model, I couldnāt find a 4MB model in the UK) with trusty.
The issue comes and goes. I canāt figure out a pattern. If I restart it disappears. Sometimes it disappears for some time, but then annoyingly reappears seemingly at random.
I donāt remember ever seeing this issue before google play and android apps appeared.