WSL: WSL 18.04 apt upgrade failure
I recently downloaded Ubuntu 18.04 App from Microsoft App Store.
Subsequently, I update app packages through sudo apt-get update and then, sudo apt-get upgrade
then I the following message came up with errors (just fresh WSL system nothing has been installed),
and, there are after I installed GCC, clang, gdb, and python3 also it’s getting same upgrading error saying -
Error: insufficient privileges to access the ebtables rulesets.
Errors were encountered while processing: /var/cache/apt/archives/ebtables_2.0.10.4-3.5ubuntu2.18.04.1_amd64.deb
Please help me to resolve this issue. Thank you.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 13
- Comments: 32
@macxfadz
I mentioned a workaround above.
You can also simply hold ebtables using apt:
@macxfadz A temporary workaround is here: https://github.com/Microsoft/WSL/issues/1761#issuecomment-392575807
@akshaybabloo
ebtables is old software that few actually use any more. It is maintained as legacy software by the developers that inherited it who only provide the most basic security patches and updates.
ebtables is also not compatible with WSL yet because the WSL layer hasn’t fully implemented all the advanced networking calls that ebtables and it’s parent software iptables uses. So no one is really using ebtables on WSL.
@macxfadz
This bug, in the upgrade script on Ubuntu 18.04, only affects Ubuntu 18.04 images. So Ubuntu 16.04, OpenSUSE, SEL, and Kali users are unaffected. The fix is for the upgrade script in Ubuntu 18.04 to ignore the error when ebtables tries something not yet supported by WSL as part of the upgrade process. The second post on this thread contains a link to the Ubuntu bug report. If you look you will see a patch in Ubuntu has been generated, pushed to Cosmic, which is 18.10 in progress, for testing, and will filter down to Bionic, 18.04, in due time.
Windows or WSL itself will not need a patch, although it’s possible eventually WSL will support the network calls ebtables is flunking out on during the upgrade.
The ebtables problem has been fixed. No need to hold the package anymore on Ubuntu 18.04. https://launchpad.net/ubuntu/+source/ebtables/2.0.10.4-3.5ubuntu2.18.04.3
sudo apt-mark unhold ebtablessudo apt update && sudo apt upgrade -y@macxfadz
When the ebtables upgrade script invokes the ebtables stop init script ebtables tries to open a socket and fails. Either because ebtables is at fault for misinterpreting the socket response or because WSL hasn’t fully implemented iptables (although it seem to suggest WSL should support the syscalls in question here), why it fails is not entirely clear. Either way it ends up throwing a permissions error and the upgrade script shuts the whole show down. It doesn’t matter what you run as or what runlevel.
The workaround linked above works. The patch coming to the init script similarly just ignores the error.
The patch works well in Cosmic, should be backported to Bionic shortly.
https://bugs.launchpad.net/ubuntu/+source/ebtables/+bug/1774120
Ubuntu are taking action by changing the package management script.
@macxfadz yep. Looks like that. Or even a patch would be enough
Well, anything I could say would be speaking for Balint, which I don’t. All I think he is trying to say is that etables could deal better with the error returned by WSL, which makes etables technically more correct, and thus addresses the hard fail.
EPROTONOSUPPORTdepends entirely on thePROTOin question. Some areSUPPORT. Some areNOSUPPORT.In the #1451 OP,
nmapnever even made it to aEPROTONOTSUPPORTreturn fromsocket(AF_INET, ...)to begin with. It was dying withEOPNOTSUPPonsndmsg()on anAF_NETLINKsocket. The latter was addressed (narrowly, because not allNETLINK_ROUTEmessages are implemented in WSL either). The former is not (or, at least not enough to make etables happy).No, why it fails is entirely clear. WSL does not implement all Linux ABI surface. Doesn’t even pretend to, per the FAQ. Aspires to, hopefully.
#1451 is
AF_NETLINK. Which is notAF_UNIX. Which is notAF_PACKET. And, is notAF_INETper #767.