Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 months ago.
Improve this question
wsl is already installed on my computer.
I enter the following commands on powershell
wsl --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The operation completed successfully.
It looks like that wsl 2 has been installed
but
wsl --version
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.900
The first line say that I have WSL 1.0.3
I don't know if this give the right result. The last line says that I have windows 10 although I have windows 11
See the page Install Linux on Windows with WSL:
Check which version of WSL you are running
Upgrade version from WSL 1 to WSL 2
AFAIK, if you use an up to date version of Windows 10 (or Windows 11), and the Virtual Machine Platform Windows Feature is enabled, then WSL 2 is installed on your system. Virtual Machine Platform enables virtualization support required by WSL 2.
When you attempt to enable WSL 2 when Virtual Machine Platform is not yet enabled, you will receive the following error message:
Please enable the Virtual Machine Platform Windows feature and ensure
that virtualization is enabled in the BIOS.
Since you did not receive this error message, I think that everything is fine and you now have WSL 2.
Run the following command and check the VERSION column:
wsl -l -v
The command lists Linux distros you have installed for WSL. If you see version 1, then run the following command to change it to WSL 2:
wsl --set-version MyDistro 2
Replace MyDistro placeholder with an actual name.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I just upgraded my mac OS from Catalina to Big Sur. My vagrant used to be working normally before and then I encountered this issue. (Vagrant version: 2.2.13)
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
When I tried to start it manually on the VirtualBox this is the return message:
Kernel driver not installed (rc=-1908)
Make sure the kernel module has been loaded successfully.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
Does anyone have a clue on how to fix this issue?
I had the same issue after updating to Big Sur. I downloaded the latest versions of Vagrant, Virtualbox and VirtualBox Extension Pack. Actually, I don't know if installing the Extension Pack was necessary.
And in the system preferences of MacOS, in Privacy and Security, I had to approve the update from Oracle.
After these steps, I was able to 'vagrant up' again.
Updating VirtualBox to 6.1.16 did it for me.
I did not update Vagrant
Updating VirtualBox to 6.1.16 did it for me, not working with 6.0.24.
Also reinstalled Vagrant but not sure if necessary.
The allow oracle button in privacy and security never showed up in my settings.
Eventually I got it working by booting in recovery mode and running the command
csrutil clear
After that I was able to allow oracle in security and privacy.
Fixed by reinstalling both Vagrant and VirtualBox :)
I Also just ran into this issue today after updating to Big Sur. Using homebrew to update VirtualBox (v. 6.1.16) and approving in Security & Privacy did not resolve the problem. I had to give VirtualBox Full Disk Access in the Privacy Tab of Security & Privacy to solve this.
The last comment form the virtualbox forum is what helped me with the last step.
https://forums.virtualbox.org/viewtopic.php?f=39&t=98763#p488757
Upgrading virtual box to latest version (6.1.16 at this moment) works for me. Didn't had to upgrade vagrant version.
vagrant up worked right after upgrading the virtual box.
I have a problem when installing a Docker Desktop 2.3.0.3
"Installation failed: one prerequisite is not fullfilled"
Docker Desktop requires Windows 10 Pro/Enterprise (15063+) or Windows 10 Home (19018+).
My Computer System Specification:
OS Name: Microsoft Windows 10 Pro
Version: 10.0.10240 Build 10240
RAM: 8Gb
I have tried manually Install Hyper-V and Containers in my Computer, but still failed to install the desktop docker.. Anyone can help me? Im need your help.
You need to install Windows 10 Home 2004 build which was released on May 2020, you can use Microsoft's update assistant to manually get the update if it's not showing up for you on Windows.
Get it here: https://www.microsoft.com/en-us/software-download/windows10
You may want to try Docker Toolbox
Docker Toolbox is an installer for quick setup and launch of a Docker
environment on older Mac and Windows systems that do not meet the
requirements of the new Docker Desktop for Mac and Docker Desktop for
Windows apps.
The actual required Windows version is greater than what it says in the installer GUI.
It might be a typo! and according to Docker this has happened before:
Docker actually requires Windows build xxxxx or greater - we're
working on the typo in the installer gui, but you'll need to update
your Windows to proceed. (Jan 8, 2018)
Just Update Windows and the problem goes away.
If you cannot update the system use choco
Install following the official Сhocolatey documentation: https://chocolatey.org/install
After installation, run the command choco install docker-desktop or follow the official installation documentation https://community.chocolatey.org/packages/docker-desktop
I need to install Docker on my pc with Windows 10 home. I read that I can only install Docker Toolbox. Is there any way to have the latest Docker version instead without upgrading my pc to windows 10 pro?
Thanks
Update
Docker can now be installed on Windows 10 Home (version 2004 or higher).
Refer to this article for installation instructions
https://docs.docker.com/docker-for-windows/install-windows-home/
Old Answer
Docker for Windows requires Hyper-V, and Hyper-V requires Windows 10 Pro (or Windows Server). So no, you can't run Docker without upgrading.
https://docs.docker.com/docker-for-windows/install/
README FIRST for Docker Toolbox and Docker Machine users: Docker for Windows requires Microsoft Hyper-V to run. The Docker for Windows installer enables Hyper-V for you, if needed, and restart your machine.
https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
Check Requirements
Windows 10 Enterprise, Professional, or Education
64-bit Processor with Second Level Address Translation (SLAT).
CPU support for VM Monitor Mode Extension (VT-c on Intel CPU's).
Minimum of 4 GB memory.
The Hyper-V role cannot be installed on Windows 10 Home.
You can now install Docker Desktop on Windows Home machines using the WSL 2 backend. Docker Desktop on Windows Home is a full version of Docker Desktop for Linux container development.
https://docs.docker.com/docker-for-windows/install-windows-home/
Install Windows 10, version 2004 or higher.
Enable the WSL 2 feature on Windows. For detailed instructions, refer to the Microsoft documentation.
https://learn.microsoft.com/en-us/windows/wsl/install-win10
The following hardware prerequisites are required to successfully run WSL 2 on Windows 10 Home:
64 bit processor with Second Level Address Translation (SLAT)
4GB system RAM
BIOS-level hardware virtualization support must be enabled in the BIOS settings. For more information, see Virtualization.
https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled
Download and install the Linux kernel update package.
https://learn.microsoft.com/en-us/windows/wsl/wsl2-kernel
I recently installed Ubuntu for Windows and now inside the Start Menu there are 2 new items:
Bash
Bash
This terminal opens in:
root#myName-PC:/mnt/c/Windows/System32#
Ubuntu
Ubuntu
This terminal opens in:
root#myname-PC:~#
What is the difference between the two?
For example, we want to install Git and Utils, RVM (Ruby) then clone a Git project and deploy via SSH with Capistrano commands. Should that be run with Bash or Ubuntu as above?
Also, should the commands be run in system32 or C:/ folder when inside the terminal?
Thanks
The Bash terminal is the old style (prior to Windows 10 v1790 a.k.a. Fall Creator Update). It resides in %LocalAppData%\Lxss and is managed using lxrun.exe.
The Ubuntu terminal is the new style, downloaded from Microsoft Store. The launcher part is a Windows App (%ProgramFiles%\WindowsApp) and its data resides in %LocalAppData%\Packages.
Those are two isolated installation of Windows Subsystem for Linux and do not interfere with each other. Practically you need only one of them, so choose one at your own preference.
I personally dislike the Windows Store version as it can be easily removed, which isn't a good thing for a productivity environment.
I was trying to delete the legacy "Bash on Windows" and wasn't unable to because lxrun.exe is not available in my system. But in case anyone needs it, here's how:
If you wish, you can manually delete your legacy instance. This may be required if you encounter issues uninstalling the legacy distro using lxrun.exe, or are running Windows 10 Spring 2018 Update (or later) which do not ship with lxrun.exe.
To forcefully delete your legacy WSL distro, delete the %localappdata%\lxss\ folder (and all it's sub-contents) using Windows' File Explorer, or the command-line: (using PowerShell)
rm -Recurse $env:localappdata/lxss/
The git bash vs the Ubuntu bash.
Basically there is nothing much different except maybe the versions of the bash. Because bash is bash. It's most likely different versions of bash were installed at different times for different purposes on the PC. And they will also likely be found in different folders on the PC.
Run the following code from the two different shells. This returns the version of bash:
echo "$BASH_VERSION"
On this PC, using the two terminals (MinGW and Ubuntu) returned the following versions of bash: (see image link below)
5.0.17(1) - release
4.4.23(1) - release
It's likely most people using PCs that have been around a while will find that there are two (or more) different versions of bash installed on their PCs. On this PC, the older version of bash was installed some time back.
That older version of bash might have been installed when Cygwin was installed on this PC. Or maybe the older version of bash was installed when Git was installed long ago. It really doesn't matter now. On this PC, bash is found in at least these following locations:
C:\cygwin64\bin\bash.exe
C:\Program Files\Git\bin\bash.exe
C:\Program Files\Git\git-bash.exe
The Windows 10 on this PC was updated. Specifically, the WSL kernel was updated from WSL to WSL2. Part of this update involved turning on some Windows features, including the: Windows Subsystem for Linux.
There was an old (virtual) version of Ubuntu (18.04) that had been installed on this PC some time back. But that old version of Ubuntu went away with this update. This WSL2 update changes the way Linux (Ubuntu) operates on this PC. After the WSL2 update, Ubuntu was installed from the Microsoft Store. This is Ubuntu 20.04.
This WSL2 update and the newly installed version of Ubuntu also installed a newer version of bash on this PC. And this newer version of bash is the newer version of bash that is showing above.
Another good way to understand the difference between these two versions of bash would be to enter the following into each shell:
type ping
The result should clearly show that one version of bash is providing the source from Windows while the other version of bash provides the source from Ubuntu.
ping is /c/windows/system32/ping
ping is /usr/bin/ping
Sometimes a picture is worth more than a thousand words. Attached below are two of the new Windows Terminals side by side.
These terminals show the two different versions of bash. Echo returns the older version of bash being used in the MinGW shell and Echo returns a newer version of bash being used in the Ubuntu shell.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have installed Oracle JDK 7 u21 (64bit) on my Mac OS X Lion 10.8.3 MacBook.
Both javac -version and java -version return the correct information on my machine.
Now, based on my installation instructions, my friend installed it on her machine.
[Note:I have a detailed installation document that I made for this purpose.]
Previously the machine had Apple JDK 6 on it.
However after the installation, she reports a problem.
When she types in sudo javac -version, she gets returned the correct javac version.
However when she tries sudo java -version
she gets an error, telling her that java is a command that it does not recognize.
I spent a couple of hours yesterday, trying to get this problem fixed on her machine through a Skype session, but to no avail.
So the purpose of this question is to find out: what could she be missing in this installation and configuration? What could be going wrong on her machine with the same instructions that worked on my machine that has an identical version of Mac OS and the same Oracle JDK installer?
You could try to check if the java plugin is installed.
Open a terminal on her Mac and run this.
/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/bin/java -version
The directory jdk1.7.0_10.jdk might be different depending on your version number.
This is the path where Oracle sets up the JDK I believe. If you cannot find that something is wrong. If you do find it you should be able to add /Library/Java/JavaVirtualMachines/jdk(VERSION NUMBER HERE)/Contents/Home/bin/ to your path by editing ~.bash_profile via terminal. You can do that like this:
cd ~
nano .bash_profile
(Enter the info like this at the bottom of the file): export PATH=$PATH:/Library/Java/JavaVirtualMachines/jdk(VERSION NUMBER HERE)/Contents/Home/bin/
ctrl+o to save. ctrl+x to exit.
Then close your terminal and re-open it. Try that java command again.