Repository navigation
Description
I have completely uninstalled and reinstalled and continue to receive the following errors:
root@localhost:/var# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)
Setting up udev (204-5ubuntu20.19) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: No such file or directory
runlevel:/var/run/utmp: No such file or directory
- udev requires devtmpfs support, not started
...fail!
invoke-rc.d: initscript udev, action "restart" failed.
dpkg: error processing package udev (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of systemd-services:
systemd-services depends on udev (>= 175-0ubuntu23); however:
Package udev is not configured yet.
dpkg: error processing package systemd-services (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-systemd:amd64:
No apport report written because the error message indicates its a followup error from a previous failure. libpam-systemd:amd64 depends on systemd-services (= 204-5ubuntu20.19); however:
Package systemd-services is not configured yet.
dpkg: error processing package libpam-systemd:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of initramfs-tools:
No apport report written because the error message indicates its a followup error from a previous failure. initramfs-tools depends on udev (>= 147~-5); however:
Package udev is not configured yet.
dpkg: error processing package initramfs-tools (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
udev
systemd-services
libpam-systemd:amd64
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Activity
mindleak commentedon Apr 12, 2016
I am having this identical issue.
plessbd commentedon Apr 12, 2016
thought the crash log I got might be useful, also note that I didnt install bash on windows until 2016-04-11 so I am not sure what the 2016-03-23 commands are from
nuclearmistake commentedon Apr 12, 2016
If they're not explicit dependencies of something you need, remove systemd/upstart and autoremove --purge? at best, they would only no-op. udev seems likely to be irrelevant as well.
plessbd commentedon Apr 12, 2016
I actually got this after trying to an
apt-get autoremoveIf I try to remove upstart apt wants to install anacron, as well as remove a lot of things.
nuclearmistake commentedon Apr 12, 2016
unless you're using one of them, they're not necessary. Plymouth is the little ubuntu splash screen that shows during boot of a ubuntu system (or the text [OK] messages)... the other ones are similarly unapplicable to the bash shell.
maybe some day microsoft will wrap upstart in startup tasks, but until then, none of its jobs ever happen.
If it is a dependency of something you actually need to have, you might have to package your own deb with neutered upstart support and without the dependency, or source install, that is, if you care about apt-get upgrading :-P
plessbd commentedon Apr 12, 2016
I am on the preview fast track, if there is ANYTHING that I NEED, I am doing something extremely wrong. :)
I am only reporting because of how easy this was to get to without doing really "anything" crazy.
my entire history was
and then I got the message that i could do the autoremove
I tried the auto remove and these were the error messages I got.
So this really doesnt seem like something I did that would be out of the ordinary for anyone to have happen.
My machine is completely for testing, so it is a very base system. I installed the browsers and atom. Other than that I dont have anything on this machine.
nuclearmistake commentedon Apr 12, 2016
much of the linux-y stuff's broken out of the box because the ubuntu-standard metapackage (which is installed by the bash for windows installer) has dependencies that break apt-get upgrade... but that aren't strictly necessary for a vast majority of the things that DO work
russalex commentedon Apr 12, 2016
This is an issue that everyone will start seeing. We need to add something on this in our official docs.
As Eric McCann (@nuclearmistake) points out, udev is something that breaks in apt-get but the errors should not cause any issues in WSL. We have reached out to Canonical on this one asking for the best solution and they recommend the following changes:
Write the following to /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
I have tried this one myself and it looks to work quite well.
nuclearmistake commentedon Apr 12, 2016
copy+pasta-able version of canonical's fix via Russ Alexander (@russalex)
Confirmed to allow apt-get upgrade with the ubuntu-standard metapackage installed.
Thanks for the hookup, m8
maarten256 commentedon Apr 13, 2016
Eric McCann (@nuclearmistake) suggestion works for me.
nshanny commentedon Apr 13, 2016
The suggestion works. Thanks. A fun project to hack on. It would be really, really cool if you somehow open sourced this project so the community could commit fixes/solutions. Just saying...
benhillis commentedon Apr 13, 2016
Thanks for hacking away! We are humbled by the excitement the development community has shown thus far. Open sourcing the project is something we are investigating but nothing to share at this time. Stay tuned!
Tornevall commentedon Apr 14, 2016
I have a few installation scripts that normally is started from "real" Ubuntu servers and they are dependent on the upgrading part. Running that script in a "Windows Bash" may give quite big problems with broken dependencies, so I've built a very simple script that tries to find out if the instance is actually running from Windows (since I need to find out if it does). Since the version for Windows don't act the same way, I've found a way, but it would be interesting with getting some feedback on this, since there may be even better methods to find out if running from Windows.
The implementation makes the script completely ignore upgrade steps, where they are normally automated.
Feel free to comment at http://tornevalls.se/blog/2016/04/13/methods-to-find-out-if-we-are-running-bash-in-windows-subsystem-for-linux/
benhillis commentedon Apr 15, 2016
A fix for the udev apt update issues is on it's way to the flighting branch. When the fix reaches the branch new subsystem installs will no longer have this issue.
The workaround provided above will continue to work for people who do not want to blow away their Ubuntu file system.
ylluminate commentedon Apr 15, 2016
Ben Hillis (@benhillis) that's great to hear. Can you also explain the
flighting branchmore or point us to the documentation regarding this? Is this a set of sources that we need to change over to in theaptsource list, etc?Also, to what are you referring on the remark of "blow away their Ubuntu file system?" I was not aware that there was anyone ever concerned about losing the Ubuntu installation (I'm assuming you're referring to the hierarchical installation of Ubuntu files since it lives on the Windows' file system vs its own isolated fs).
9 remaining items
gdh1995 commentedon Jul 24, 2016
On bash newly installed on Win10 education (build 14390), the bug indeed exists.
And my
sshdcan not be connected by any means. Any ideas?lorthirk commentedon Aug 3, 2016
It seems that this issue is still here in Official Windows 10 Anniversary Update, just instlaled. Never had any Windows Insider build on this machine. Here's my log installing node (sorry it's in Italian, but I think it's pretty understandable anyway -- "Impossibile connettersi a Upstart" means "Unable to connect to Upstart", and "Connessione Rifiutata" means "Connection Refused"):
Skysplit commentedon Aug 3, 2016
+1 for this issue as this error appears in anniversary update version.
Trying to start nginx/docker (didn't test other things) results in
Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: No such file or directory.craigeous commentedon Aug 4, 2016
I performed the lxrun.exe /uninstall /full and lxrun.exe /install just to start fresh as I was on the fast ring, but the apt-get remove udev upstart and auto-remove did the trick for me.
After the fresh install, I did the remove and auto-remove, then update and upgrade. after that was all done i no longer saw upstart errors and was able to run openssh-server.
lorthirk commentedon Aug 4, 2016
Well... this will remove upstart, but I'm wondering whether it's safe to do so.
craigeous commentedon Aug 4, 2016
i'm still able to start and stop services just fine. i was looking at installing systemd as that is what has replaced upstart anyway to see if there are any issues there.
nandotech commentedon Aug 7, 2016
Just had a completely fresh upgrade to Anniversary Edition and can confirm I am still seeing this issue.
In my particular case, I was/am simply trying to install redis-server (and run it) on my Bash Ubuntu on Windows.
After reading through this thread I tried the first few suggested solutions, after no luck I went ahead and ran
lxrun.exe /uninstall /fullfollowed bylxrun.exe /install. Before even installing anyting else at this point, I attemptedsudo apt-get install redis-serverHere is the output (starting where it went funky):
The files and server appear to be installed, but I can not run the server. If I attempt redis-cli, I get
Could not connect to Redis at 127.0.0.1:6379: Connection refusedNot sure where to go from here..
rodrymbo commentedon Aug 16, 2016
I believe that the error about connecting to
upstarthas to do with the install wanting to register withupstartso the new program gets started automatically or something. But sinceupstartisn't running in WSL (and there's no promise for when it will be), the connection to the socket is refused. Usually this means that the rest of the install worked just fine, except for the part about havingupstartstart it automatically. So you will need to start it yourself manually, which frequently works pretty well.If there is a script in
/etc/init.d/for starting the program, you can use that, e.g.sudo /etc/init.d/ssh start, which works for many of us. (Those are old-fashioned scripts but work well. There's no upstart, so they won't start automatically. You can runservice ssh startall you want, but nothing will happen untilupstartstarts running.) If there's a file in/etc/initinstead, you'd have to look in it to get a clue about howupstartwould start the program, ifupstartwas running, then do that yourself or put it in a script. Or you can look in man or other documentation. If you can find a way to run it in the foreground, without going into the background (e.g.sudo cron -f), it will hold the bash.exe window open, meaning it will run forever or until you force it closed.If apt-get decides the error about not talking to
upstartis fatal, so it doesn't finish installing or upgrading the new program, that's a different problem. But if the service is installed okay and is just not starting because upstart isn't running, a workaround is to start the service yourself manually.The other complication about starting services yourself manually is that they get shut down when the last bash.exe window closes. So you have to leave at least one going, minimized or whatever. There are instructions for doing this with ssh, if you want to try to experiment. This is just a workaround, not meant to be a permanent replacement for
upstartorsystemdor whatever.unuigbee commentedon Sep 25, 2016
From Ubuntu: SystemdForUpstartUsers
Support status
So it's not safe to remove upstart as it will probably cause incompatibilities issues with other programs that rely on upstart
sunilmut commentedon Dec 29, 2016
@Benosika - I am not sure which issue you are referring to, but if it is the
udevone, then a workaround is posted above by Russ Alexander (@russalex).shyandsy commentedon Feb 13, 2017
Russ Alexander (@russalex) thank you so much
it works for me
mavaddat commentedon Feb 11, 2022
Flawless kludge. It worked for me.
startergo commentedon May 7, 2024
Still a problem and the solutions do not work:
Fixed the error by: