bun
bun copied to clipboard
Docker io_uring error
Version
0.1.4
Platform
Linux olyno-PC 5.10.101-amd64-desktop #20.00.05.06-release SMP Mon Mar 14 09:34:55 CST 2022 x86_64 GNU/Linux
What steps will reproduce the bug?
Here are my steps to reproduce the error:
docker pull jarredsumner/bun:edge
docker run -it --rm --init --ulimit memlock=-1:-1 jarredsumner/bun:edge
bun create next ./next-bun
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
Creating a NextJS project with Bun without error
What do you see instead?
Fetching package.json... error: Linux kernel version doesn't support io_uring, which Bun depends on.
To fix this error: please upgrade to a newer Linux kernel.
If you're using Windows Subsystem for Linux, here's how:
1. Open PowerShell as an administrator
2. Run this:
wsl --update
wsl --shutdown
If that doesn't work (and you're on a Windows machine), try this:
1. Open Windows Update
2. Download any updates to Windows Subsystem for Linux
If you're still having trouble, ask for help in bun's discord https://bun.sh/discord
Additional information
No response
Same
I get the same error
Very helpfull on it's own
System: Debian 10 Kernel: Linux 4.19.0-21-amd64 x86_64 Env: No wsl, docker service running, no containers running Bun path: $HOME/.bun/bin/bun
Reproduction:
❯ bun --verbose install
error: Linux kernel version doesn't support io_uring, which Bun depends on.
To fix this error: please upgrade to a newer Linux kernel.
If you're using Windows Subsystem for Linux, here's how:
1. Open PowerShell as an administrator
2. Run this:
wsl --update
wsl --shutdown
If that doesn't work (and you're on a Windows machine), try this:
1. Open Windows Update
2. Download any updates to Windows Subsystem for Linux
If you're still having trouble, ask for help in bun's discord https://bun.sh/discord
❯ which -a wsl
wsl not found
I can provide additional info if needed
You must update kernel to latest version.
Updating the kernel to the latest version can literally break the whole OS we're using. It's definitely not recommended.
Io_uring requires kernel 5.1>
I suggest adding a check in the install script
Container images do not ship with the linux kernel. Containers share the kernel of the host OS. If the host of the container does not have io_uring support, such as any kernel <5.1 and kernels >5.1 with io_uring disabled, then io_uring won't be available in the container.
If your host OS does not have io_uring support, instead of using a container I recommend running a kernel-based virtual machine running an OS with io_uring support.
This is a serious problem with Bun, I don't think it can be solved easily. RHEL is one major distribution, particularly on servers, and it ships with io_uring disabled despite the kernel being >5.14 on version 9.
So what should I do? How to run Bun on WSL2?
Older releases of Bun used to depend more heavily on io_uring
, like for bun install
and fetch()
. Not anymore, though we will still keep this open so we can implement nice fallbacks.