在CentOS 8上安装Wine 4

在本指南中,您将学习如何在CentOS 8上安装Wine 4。 葡萄酒(w ^我的 s ñ一个 Ë仿真器) 免费的开源软件,可以运行Microsoft Windows应用程序和在POSIX兼容操作系统(例如Linux,MacOS和BSD)上运行的计算机游戏。

在CentOS 8上安装Wine 4

在CentOS 8上安装EPEL存储库

Wine不包含在默认的CentOS 8存储库中,但可以在EPEL存储库中使用。因此,执行以下命令以安装EPEL存储库。

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

启用PowerTools存储库

Wine所需的某些依赖项由PowerTools存储库提供,可以通过运行以下命令来启用它:

dnf config-manager --set-enabled PowerTools

执行系统更新

将系统软件包重新同步到最新版本。

dnf update

安装Wine 4

找出提供葡萄酒的包装,并确保EPEL存储库中提供了Wine。

dnf whatprovides wine
wine-4.0.2-1.el8.x86_64 : A compatibility layer for windows applications
Repo        : epel
Matched from:
Provide    : wine = 4.0.2-1.el8

如您所见,EPEL存储库中提供了Wine 4.0.2。撰写本文时,Wine的最新版本是Wine 4.0.3

在安装Wine之前,还需要安装一些其他依赖项。例如, isdn4k-utils 提供用于配置ISDN子系统的实用程序。

isdn4k-utils 您可以运行命令进行安装。

dnf localinstall http://mirror.centos.org/centos/7/os/x86_64/Packages/isdn4k-utils-3.2-99.el7.x86_64.rpm

完成上述步骤后,您可以继续安装Wine 4.0.2。

dnf install wine
Dependencies resolved.
=======================================================================================================================================================
 Package                                      Arch                 Version                                              Repository                Size
=======================================================================================================================================================
Installing:
 wine                                         x86_64               4.0.2-1.el8                                          epel                      54 k
Installing dependencies:
 alsa-lib                                     x86_64               1.1.6-3.el8                                          AppStream                432 k
 cairo                                        x86_64               1.15.12-3.el8                                        AppStream                721 k
 desktop-file-utils                           x86_64               0.23-8.el8                                           AppStream                 80 k
 flac-libs                                    x86_64               1.3.2-9.el8                                          AppStream                217 k
 fribidi                                      x86_64               1.0.4-6.el8                                          AppStream                 89 k
 gd                                           x86_64               2.2.5-6.el8                                          AppStream                144 k
 graphite2                                    x86_64               1.3.10-10.el8                                        AppStream                122 k
 gsm                                          x86_64               1.0.17-5.el8                                         AppStream                 37 k
 gstreamer1                                   x86_64               1.14.0-3.el8                                         AppStream                1.3 M
 gstreamer1-plugins-base                      x86_64               1.14.0-4.el8                                         AppStream                1.8 M
 harfbuzz                                     x86_64               1.7.5-3.el8                                          AppStream                295 k
 hicolor-icon-theme                           noarch               0.17-2.el8                                           AppStream                 49 k
 iso-codes                                    noarch               3.79-2.el8                                           AppStream                3.4 M
 jbigkit-libs                                 x86_64               2.1-14.el8                                           AppStream                 55 k
 lcms2                                        x86_64               2.9-2.el8                                            AppStream                165 k
 libICE                                       x86_64               1.0.9-13.el8                                         AppStream                 74 k
 libSM                                        x86_64               1.2.3-1.el8                                          AppStream                 48 k
 libX11                                       x86_64               1.6.7-1.el8                                          AppStream                612 k
 libX11-common                                noarch               1.6.7-1.el8                                          AppStream                157 k
 libX11-xcb                                   x86_64               1.6.7-1.el8                                          AppStream                 14 k
 libXau                                       x86_64               1.0.8-13.el8                                         AppStream                 36 k
 libXcomposite                                x86_64               0.4.4-14.el8                                         AppStream                 28 k
 libXcursor                                   x86_64               1.1.15-3.el8                                         AppStream                 36 k
 libXdamage                                   x86_64               1.1.4-14.el8                                         AppStream                 27 k
 libXext                                      x86_64               1.3.3-9.el8                                          AppStream                 45 k
 libXfixes                                    x86_64               5.0.3-7.el8                                          AppStream                 25 k
 libXft                                       x86_64               2.3.2-10.el8                                         AppStream                 66 k
 libXi                                        x86_64               1.7.9-7.el8                                          AppStream                 49 k
 libXinerama                                  x86_64               1.1.4-1.el8                                          AppStream                 16 k
 libXpm                                       x86_64               3.5.12-7.el8                                         AppStream                 58 k
 libXrandr                                    x86_64               1.5.1-7.el8                                          AppStream                 33 k
 libXrender                                   x86_64               0.9.10-7.el8                                         AppStream                 33 k
 libXtst                                      x86_64               1.2.3-7.el8                                          AppStream                 22 k
 libXv                                        x86_64               1.0.11-7.el8                                         AppStream                 20 k
 libXxf86vm                                   x86_64               1.1.4-9.el8                                          AppStream                 19 k
 libasyncns                                   x86_64               0.8-14.el8                                           AppStream                 32 k
 libdatrie                                    x86_64               0.2.9-7.el8                                          AppStream                 33 k
 libdrm                                       x86_64               2.4.96-2.el8                                         AppStream                164 k
 libexif                                      x86_64               0.6.21-16.el8                                        AppStream                355 k
 libglvnd                                     x86_64               1:1.0.1-0.9.git5baa1e5.el8                           AppStream                 95 k
 libglvnd-egl                                 x86_64               1:1.0.1-0.9.git5baa1e5.el8                           AppStream                 50 k
 libglvnd-gles                                x86_64               1:1.0.1-0.9.git5baa1e5.el8                           AppStream                 41 k
 libglvnd-glx                                 x86_64               1:1.0.1-0.9.git5baa1e5.el8                           AppStream                131 k
 libgphoto2                                   x86_64               2.5.16-3.el8                                         AppStream                1.4 M
 libieee1284                                  x86_64               0.2.11-28.el8                                        AppStream                 46 k
 libjpeg-turbo                                x86_64               1.5.3-7.el8                                          AppStream                155 k
 libogg                                       x86_64               2:1.3.2-10.el8                                       AppStream                 31 k
 libsndfile                                   x86_64               1.0.28-8.el8                                         AppStream                193 k
 libthai                                      x86_64               0.1.27-2.el8                                         AppStream                203 k
 libtheora                                    x86_64               1:1.1.1-21.el8                                       AppStream                184 k
 libtiff                                      x86_64               4.0.9-13.el8                                         AppStream                188 k
 libv4l                                       x86_64               1.14.2-3.el8                                         AppStream                194 k
 libvisual                                    x86_64               1:0.4.0-24.el8                                       AppStream                145 k
 libvorbis                                    x86_64               1:1.3.6-1.el8                                        AppStream                196 k
 libwayland-client                            x86_64               1.15.0-1.el8                                         AppStream                 39 k
 libwayland-cursor                            x86_64               1.15.0-1.el8                                         AppStream                 26 k
 libwayland-egl                               x86_64               1.15.0-1.el8                                         AppStream                 19 k
 libwayland-server                            x86_64               1.15.0-1.el8                                         AppStream                 45 k
 libwebp                                      x86_64               1.0.0-1.el8                                          AppStream                273 k
 libxcb                                       x86_64               1.13-5.el8                                           AppStream                230 k
 libxshmfence                                 x86_64               1.3-2.el8                                            AppStream                 13 k
 llvm-libs                                    x86_64               7.0.1-3.module_el8.0.0+176+9dc62ab1                  AppStream                 17 M
 mesa-dri-drivers                             x86_64               18.3.1-5.el8_0                                       AppStream                7.3 M
 mesa-filesystem                              x86_64               18.3.1-5.el8_0                                       AppStream                 32 k
 mesa-libEGL                                  x86_64               18.3.1-5.el8_0                                       AppStream                161 k
 mesa-libGL                                   x86_64               18.3.1-5.el8_0                                       AppStream                215 k
 mesa-libOSMesa                               x86_64               18.3.1-5.el8_0                                       AppStream                2.7 M
 mesa-libgbm                                  x86_64               18.3.1-5.el8_0                                       AppStream                 88 k
 mesa-libglapi                                x86_64               18.3.1-5.el8_0                                       AppStream                 60 k
 mesa-vulkan-drivers                          x86_64               18.3.1-5.el8_0                                       AppStream                2.2 M
 mpg123-libs                                  x86_64               1.25.10-2.el8                                        AppStream                208 k
 openal-soft                                  x86_64               1.18.2-7.el8                                         AppStream                394 k
 opus                                         x86_64               1.3-0.4.beta.el8                                     AppStream                204 k
 orc                                          x86_64               0.4.28-2.el8                                         AppStream                175 k
 pango                                        x86_64               1.42.4-5.el8_0                                       AppStream                297 k
 pixman                                       x86_64               0.36.0-1.el8                                         AppStream                256 k
 pulseaudio-libs                              x86_64               11.1-22.el8                                          AppStream                675 k
 sane-backends                                x86_64               1.0.27-19.el8                                        AppStream                795 k
 sane-backends-libs                           x86_64               1.0.27-19.el8                                        AppStream                109 k
 unixODBC                                     x86_64               2.3.7-1.el8                                          AppStream                458 k
 vulkan-loader                                x86_64               1.1.82.0-1.el8                                       AppStream                107 k
 avahi                                        x86_64               0.7-19.el8                                           BaseOS                   282 k
 avahi-libs                                   x86_64               0.7-19.el8                                           BaseOS                    62 k
 cups-libs                                    x86_64               1:2.2.6-25.el8                                       BaseOS                   432 k
 fontconfig                                   x86_64               2.13.1-3.el8                                         BaseOS                   275 k
 fontpackages-filesystem                      noarch               1.44-22.el8                                          BaseOS                    16 k
 libatomic                                    x86_64               8.2.1-3.5.el8                                        BaseOS                    20 k
 liberation-fonts-common                      noarch               1:2.00.3-4.el8                                       BaseOS                    26 k
 liberation-mono-fonts                        noarch               1:2.00.3-4.el8                                       BaseOS                   504 k
 liberation-sans-fonts                        noarch               1:2.00.3-4.el8                                       BaseOS                   609 k
 liberation-serif-fonts                       noarch               1:2.00.3-4.el8                                       BaseOS                   607 k
 libpciaccess                                 x86_64               0.14-1.el8                                           BaseOS                    32 k
 lockdev                                      x86_64               1.0.4-0.28.20111007git.el8                           BaseOS                    41 k
 xml-common                                   noarch               0.6.3-50.el8                                         BaseOS                    39 k
 SDL2                                         x86_64               2.0.8-7.el8                                          PowerTools               429 k
 spirv-tools-libs                             x86_64               2019.1-1.el8_0                                       PowerTools               1.1 M
 libvkd3d                                     x86_64               1.1-3.el8                                            epel                     158 k
 nss-mdns                                     x86_64               0.14.1-3.el8                                         epel                      48 k
 wine-alsa                                    x86_64               4.0.2-1.el8                                          epel                     110 k
 wine-capi                                    x86_64               4.0.2-1.el8                                          epel                      59 k
 wine-cms                                     x86_64               4.0.2-1.el8                                          epel                      80 k
 wine-common                                  noarch               4.0.2-1.el8                                          epel                     108 k
 wine-core                                    x86_64               4.0.2-1.el8                                          epel                      28 M
 wine-courier-fonts                           noarch               4.0.2-1.el8                                          epel                      67 k
 wine-desktop                                 noarch               4.0.2-1.el8                                          epel                     156 k
 wine-filesystem                              noarch               4.0.2-1.el8                                          epel                      86 k
 wine-fixedsys-fonts                          noarch               4.0.2-1.el8                                          epel                      66 k
 wine-fonts                                   noarch               4.0.2-1.el8                                          epel                      54 k
 wine-ldap                                    x86_64               4.0.2-1.el8                                          epel                     134 k
 wine-marlett-fonts                           noarch               4.0.2-1.el8                                          epel                      66 k
 wine-ms-sans-serif-fonts                     noarch               4.0.2-1.el8                                          epel                      80 k
 wine-openal                                  x86_64               4.0.2-1.el8                                          epel                      68 k
 wine-pulseaudio                              x86_64               4.0.2-1.el8                                          epel                      95 k
 wine-small-fonts                             noarch               4.0.2-1.el8                                          epel                      68 k
 wine-symbol-fonts                            noarch               4.0.2-1.el8                                          epel                      79 k
 wine-system-fonts                            noarch               4.0.2-1.el8                                          epel                      72 k
 wine-systemd                                 noarch               4.0.2-1.el8                                          epel                      54 k
 wine-tahoma-fonts                            noarch               4.0.2-1.el8                                          epel                     158 k
 wine-twain                                   x86_64               4.0.2-1.el8                                          epel                      90 k
 wine-wingdings-fonts                         noarch               4.0.2-1.el8                                          epel                      67 k
Installing weak dependencies:
 sane-backends-drivers-cameras                x86_64               1.0.27-19.el8                                        AppStream                 57 k
 sane-backends-drivers-scanners               x86_64               1.0.27-19.el8                                        AppStream                2.5 M
Enabling module streams:
 llvm-toolset                                                      rhel8                                                                              

Transaction Summary
=======================================================================================================================================================
Install  123 Packages

Total download size: 85 M
Installed size: 437 M
Is this ok [y/N]: y

在CentOS 8上验证Wine安装

要验证Wine 4是否已成功安装在CentOS 8上,只需检查Wine的版本。

wine --version
wine64 --version
wine-4.0.2

在CentOS 8上运行Wine

Wine命令的语法如下:

wine program [arguments]

如何获得使用Wine的帮助

wine --help

有关更多信息,请参见Wine手册页。

man wine

在使用Wine运行Windows应用程序之前,请重新启动系统并设置Wine环境。

systemctl reboot

使用Wine在CentOS 8上运行Windows程序的示例

确保你是 没有啦 以root用户身份运行该应用程序。

$ wine putty.exe

运行MSI安装程序;

$ wine msiexec /i putty-64bit-0.73-installer.msi

在CentOS 8上安装Wine 4

走吧,这就是在CentOS 8上安装Wine 4的全部工作。请享受。

Sidebar