First, I run this mand on my windows machine
$curl | bash
Output of the above first mand
Second, I run this mand to set this path in the file
$nano ~/.bashrc
Output of the above second mand
After setting these variables into the ~/.bashrc file. I am trying to check the version of Bun which is just installed, with this mand :
$bun --version
After running the above mand I got this output :
Command 'bun' not found, did you mean:
mand 'ben' from deb ben (0.9.0ubuntu2)
mand 'bus' from deb atm-tools (1:2.5.1-4)
mand 'zun' from deb python3-zunclient (4.0.0-0ubuntu1)
Try: apt install <deb name>
Can anyone please help me to activate Bun smoothly on my windows machine?
First, I run this mand on my windows machine
$curl https://bun.sh/install | bash
Output of the above first mand
Second, I run this mand to set this path in the file
$nano ~/.bashrc
Output of the above second mand
After setting these variables into the ~/.bashrc file. I am trying to check the version of Bun which is just installed, with this mand :
$bun --version
After running the above mand I got this output :
Command 'bun' not found, did you mean:
mand 'ben' from deb ben (0.9.0ubuntu2)
mand 'bus' from deb atm-tools (1:2.5.1-4)
mand 'zun' from deb python3-zunclient (4.0.0-0ubuntu1)
Try: apt install <deb name>
Can anyone please help me to activate Bun smoothly on my windows machine?
Share Improve this question edited Jul 11, 2022 at 20:45 NotTheDr01ds 21.2k7 gold badges60 silver badges91 bronze badges asked Jul 11, 2022 at 11:03 Sagar JadavSagar Jadav 331 silver badge4 bronze badges 1- Also, for future reference, please don't post text-as-images. Read here for why. Thanks! – NotTheDr01ds Commented Jul 11, 2022 at 12:59
4 Answers
Reset to default 3I can tell you that I have successfully installed Bun in Ubuntu 20.04 on WSL2. However, note that it will not currently run in WSL1 (from the Unix & Linux Stack). That's not the error you are seeing here, however.
Apologies in advance if this is not the case, but given that you are new here, I'm going to make an assumption that it might be something very basic that is causing the error you are seeing. The output of the first mand indicates that Bun was installed properly, so if it's not found, it seems most likely that you missed one crucial step. You also didn't state that you did it, so ...
~/.bashrc
is a file that is typically only read when you start Bash. After adding the variables to your ~/.bashrc
, to have it actually set the variables in a shell session, you need to either:
source
~/.bashrc`- Or simply start a new shell (exit WSL and restart, or just run another
bash
insidebash
, etc.
Of course, after doing this, you'll still need to be running WSL2, or you'll run into the other error.
Note that, beyond simply creating a project, I have not tested Bun extensively in WSL2. The Fireship-guy on YouTube did mention that he had some challenges in getting it to run under WSL, but I'm not sure what those were.
I've present the same problem. Context sotware=> I use win 11 and I've download ubuntu
microsoft store
For this, I enable in feactures windows turn on and off feactures
and clink here these options
For download bun 0.1.8
I've execute this mand curl -fsSL https://bun.sh/install | bash
late, at the console say that i have to put 2 line of code in a file in my case are :
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
When, I tried execute bun --version the console showed that did't find bun.
I restart the windows and it seems to have worked
I found answers in the post https://stackoverflow./a/73097326/5072481 add username path to $HOME/ is the point
I remend to just exit and restart wsl.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744894349a4599602.html
评论列表(0条)