本文介绍在Ubuntu 20.04操作系统上安装和使用Wine 5的方法。其实在Ubuntu 20.04上安装Wine 5是一个简单的过程,因为Wine仓库中提供了所有软件包。
步骤1:启用32位架构
在安装之前,如果在64位Ubuntu 20.04系统上运行,我们需要启用32位体系结构,通过运行以下命令来实现:
sudo dpkg --add-architecture i386
步骤2:下载并添加存储库密钥
如果系统中不存在wget,请安装它:
sudo apt update
sudo apt -y install software-properties-common wget
然后下载并添加存储库密钥:
wget -qO - /wine-builds/winehq.key | sudo apt-key add -
应该在输出中看到“OK”的字样,代表成功了。
步骤3:添加Wine库
导入密钥后,继续添加存储库:
sudo apt-add-repository 'deb /wine-builds/ubuntu/ focal main'
命令执行输出:
Get:1 /wine-builds/ubuntu focal InRelease [6,257 B]
Get:2 /wine-builds/ubuntu focal/main amd64 Packages [54.9 kB]
Hit:3 /ubuntu focal-security InRelease
Get:4 /wine-builds/ubuntu focal/main i386 Packages [56.4 kB]
Hit:5 http://us./ubuntu focal InRelease
Hit:6 http://us./ubuntu focal-updates InRelease
Hit:7 http://us./ubuntu focal-backports InRelease
Fetched 118 kB in 1s (80.5 kB/s)
Reading package lists... Done
步骤4:在Ubuntu 20.04 Linux上安装Wine 5
准备好存储库后,我们可以在Ubuntu 20.04 Linux机器上安装Wine 5了:
sudo apt update
sudo apt install --install-recommends winehq-stable
将被告知安装大量软件包,如果您的互联网连接较慢,则可能需要一些时间,如下信息:
The following packages will be upgraded:
libcurl3-gnutls
1 upgraded, 266 newly installed, 0 to remove and 6 not upgraded.
Need to get 271 MB/271 MB of archives.
After this operation, 1,807 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
安装软件包后,在Wine安装完成后检查所安装的版本:
$ wine --version
wine-5.11
这说明在Ubuntu 20.04系统上安装Wine 5.11已成功并顺利完成。
步骤5:在Ubuntu 20.04上使用Wine 5
对于命令行人员,可以直接在终端上调用wine工具:
$ wine
访问帮助页面:
$ wine --help
安装测试应用程序,如Notepad++:
wget /notepad-plus-plus/notepad-plus-plus/releases/download/v7.8.8/npp.7.8.8.Installer.exe
使用wine安装您下载的.exe应用程序:
wine npp.7.8.8.Installer.exe
同意安装Mono和Gecko包装:
然后使用Wine 5开始您的应用程序安装:
安装后,该应用程序可以像其他任何Linux应用程序一样启动,现在运行Notepad++应用程序:
总的来说,在Ubuntu 20.04上使用Wine 5的方法大致就是上面所说的这么简单。
相关主题