Apt upgrade在WSL上非常慢/无法使用。

huangapple go评论74阅读模式
英文:

Apt upgrade on WSL is super slow / unusable

问题

I was trying to setup a build environment on WSL. After starting it up and running sudo apt update -y && sudo apt upgrade -y It started doing its thing. But then got super slow (20kb/s) So i deleted the whole WSL and redownloaded it... Same issue. I tried disabling IPV6 in my sysctl that also didnt work.

Apt upgrade在WSL上非常慢/无法使用。

Any ideas?

英文:

I was trying to setup a build environment on WSL. After starting it up and running sudo apt update -y && sudo apt upgrade -y It started doing its thing. But then got super slow (20kb/s) So i deleted the whole WSL and redownloaded it... Same issue. I tried disabling IPV6 in my sysctl that also didnt work.

Apt upgrade在WSL上非常慢/无法使用。

Any ideas?

答案1

得分: 1

检查本地镜像,参考1,并更新 sources.list 文件。

sudo sed -i "s/archive.ubuntu.com/us.archive.ubuntu.com/" /etc/apt/sources.list

此处找到此信息。

英文:

Check the local closet mirror for you from here and update sources.list file

sudo sed -i "s/archive.ubuntu.com/us.archive.ubuntu.com/" /etc/apt/sources.list

Found this at source

答案2

得分: 0

"It started doing its thing. But then got super slow (20kb/s)"

我开始执行它的操作,但后来变得非常慢(20kb/s)。

I had exact same problem while doing scp within linux with WSL.

我在使用WSL进行Linux内的scp操作时遇到了完全相同的问题。

You can improve network performance of WSL using Powershell as Administrator:

您可以使用管理员权限的Powershell来改善WSL的网络性能:

References
1: https://github.com/microsoft/WSL/issues/4901
2: https://github.com/microsoft/WSL/issues/8171
[3]: https://answers.microsoft.com/en-us/windows/forum/all/low-internet-speed-in-wsl-2/21524829-18be-4611-bb5f-cabccd2cae31
[4]: https://townsyio.medium.com/wsl2-how-to-fix-download-speed-3edb0c348e29

英文:

"It started doing its thing. But then got super slow (20kb/s) "

I had exact same problem while doing scp within linux with WSL.

You can improve network performance of WSL using Powershell as Administrator:

 PS C:\WINDOWS\system32> Enable-NetAdapterLso -Name vEthernet* -IncludeHidden -IPv4
 PS C:\WINDOWS\system32> Enable-NetAdapterLso -Name vEthernet* -IncludeHidden -IPv6                                           PS 

References
1: https://github.com/microsoft/WSL/issues/4901
2: https://github.com/microsoft/WSL/issues/8171
[3]: https://answers.microsoft.com/en-us/windows/forum/all/low-internet-speed-in-wsl-2/21524829-18be-4611-bb5f-cabccd2cae31
[4]: https://townsyio.medium.com/wsl2-how-to-fix-download-speed-3edb0c348e29

huangapple
  • 本文由 发表于 2023年2月6日 17:50:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/75359699.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定