Windows11安装ubuntu20.04子系统、WRF、WPS、WRFDomainWizard
一. Windows11安装ubuntu20.04子系统
Windows11安装过程与Win10没有区别,按照网络上一般的方法安装即可。
安装成功后需换源,命令如下:
sudo vim /etc/apt/sources.list
将内容替换为以下:
点击查看代码
#添加阿里源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
二. 安装WRF和WPS
- 笔者一开始在虚拟机VMware 16.2.3上用Ubuntu20.0.4安装WRF,但在编译命令的时候:
./compile em_real >& log.compile不成功,错误如下:
make[2]: [Makefile:183:module_state_description.F] 错误 137 (已忽略)
换了多个ubuntu版本均产生同样的错误,官方论坛建议换系统,于是换到了子系统。 - 安装必要的解释器
sudo apt-get install csh gfortran m4 - 子系统上安装WRF和WPS没有什么特别的,按照链接中的方法即可安装成功。
https://blog.csdn.net/qq_27721925/article/details/103310841
三. 安装WRFDomainWizard
按照https://zhuanlan.zhihu.com/p/352691641的方法启动run_DomainWizard会报出如下错误:
点击查看代码
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set,
but this program performed an operation which requires it.
...
...
...
四. 安装wslg(wsl gui)
Linux GUI应用程序仅受WSL2支持,不会与为WSL1配置的Linux发行版一起使用。升级方法详见微软官网。
- 升级wsl2到最新版本:
wsl --update - 重启WSL
wsl --shutdown - 安装并运行GUI应用
点击查看代码
## Update all packages in your distro
sudo apt update
## Gedit
sudo apt install gedit -y
## GIMP
sudo apt install gimp -y
## Nautilus
sudo apt install nautilus -y
## VLC
sudo apt install vlc -y
## X11 apps
sudo apt install x11-apps -y
## Google Chrome
cd /tmp
sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt install --fix-broken -y
sudo dpkg -i google-chrome-stable_current_amd64.deb
## Microsoft Teams
cd /tmp
sudo curl -L -o "./teams.deb" "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=linux&arch=x64&download=true&linuxArchiveType=deb"
sudo apt install ./teams.deb -y
## Microsoft Edge Browser
## https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev中的安装包会有更新变动,请记得打开网址替换安装包
wget https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/microsoft-edge-dev_92.0.902.2-1_amd64.deb
sudo apt install ./microsoft-edge-dev_92.0.902.2-1_amd64.deb
- WRFDomainWizard即可成功运行

浙公网安备 33010602011771号