当尝试在 Windows 11 上使用 wsl 2 安装 nvm 时,它会抛出:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0curl: (6) Could not resolve host: raw.githubusercontent.com
Run Code Online (Sandbox Code Playgroud)
当我尝试ping google.com它时出错,而ping 8.8.8.8有效!?!
我之前曾让 CompileDaemon 在我的 golang 应用程序中工作,但它在我的 WSL Ubuntu 上停止工作。我尝试了一切让它工作,然后重新安装 WSL,切换到 Debian。我没有使用码头工人。然后我再次尝试,即使以两种不同的方式安装后,它仍然显示未找到命令:
go get github.com/githubnemo/CompileDaemon
go: added github.com/fatih/color v1.9.0
go: added github.com/fsnotify/fsnotify v1.4.9
go: added github.com/githubnemo/CompileDaemon v1.4.0
go: added github.com/mattn/go-colorable v0.1.4
go: added github.com/mattn/go-isatty v0.0.11
go: added github.com/radovskyb/watcher v1.0.7
go: added golang.org/x/sys v0.0.0-20191026070338-33540a1f6037
Run Code Online (Sandbox Code Playgroud)
或者
go install -mod=mod github.com/githubnemo/CompileDaemon
然后当我运行 CompileDaemon --command="./folder_name" 时
返回: bash:CompileDaemon:找不到命令
我使用的是 Windows 机器,并且已经安装了 wsl 以便能够使用 Docker 桌面。当然构建失败了,然后我在dockerfile中观察到了python3和pip3。所以我通过 wsl 安装了 ubuntu 和 debian,然后尝试运行该应用程序(docker-compose up)。它仍然失败并抛出以下错误:
\n ERROR [test 3/5] RUN pip3 install daff==1.3.46 0.9s\n------\n > [test 3/5] RUN pip3 install daff==1.3.46:\n0.812 error: externally-managed-environment\n0.812\n0.812 \xc3\x97 This environment is externally managed\n0.812 \xe2\x95\xb0\xe2\x94\x80> To install Python packages system-wide, try apt install\n0.812 python3-xyz, where xyz is the package you are trying to\n0.812 install.\n0.812\n0.812 If you wish to install a non-Debian-packaged Python package,\n0.812 create a virtual environment using python3 -m venv path/to/venv.\n0.812 Then use path/to/venv/bin/python and path/to/venv/bin/pip. …Run Code Online (Sandbox Code Playgroud) 我刚刚在Windows 10中安装了Ubuntu。我想在Windows和Linux之间共享数据。
但是我无法从Windows中找到Linux文件夹,也无法从Linux中找到Windows文件夹。有没有办法互相访问?我从Windows商店安装了Ubuntu。
windows-subsystem-for-linux ×4
linux ×2
docker ×1
go ×1
nvm ×1
powershell ×1
ubuntu ×1
windows ×1
windows-11 ×1
wsl-2 ×1