一、前言
Wine 是什么?官网地址
Wine (“Wine Is Not an Emulator” 的首字母缩写)是一个能够在多种 POSIX-compliant 操作系统(诸如 Linux,macOS 及 BSD 等)上运行 Windows 应用的兼容层。Wine 不是像虚拟机或者模拟器一样模仿内部的 Windows 逻辑,而是將 Windows API 调用翻译成为动态的 POSIX 调用,免除了性能和其他一些行为的内存占用,让你能够干净地集合 Windows 应用到你的桌面。注意:wine32只能运行32位.exe应用程序,wine64只能运行64位.exe应用程序。
二、安装依赖
yum groupinstall 'Development Tools' -y
yum install libX11-devel freetype-devel zlib-devel libxcb-devel -y
yum install alsa-lib-devel.i686 libsndfile-devel.i686 readline-devel.i686 glib2.i686 glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 pulseaudio-libs-devel.i686 cmake audiofile-devel.i686 freeglut-devel.i686 lcms-devel.i686 libieee1284-devel.i686 openldap-devel.i686 unixODBC-devel.i686 sane-backends-devel.i686 fontforge libgphoto2-devel.i686 isdn4k-utils-devel.i686 mesa-libGL-devel.i686 mesa-libGLU-devel.i686 libXxf86dga-devel.i686 libXxf86vm-devel.i686 giflib-devel.i686 cups-devel.i686 gsm-devel.i686 libv4l-devel.i686 fontpackages-devel ImageMagick-devel.i686 libX11-devel.i686 docbook-utils-pdf libtextcat tex-cm-lgc
yum install alsa-lib-devel audiofile-devel.i686 audiofile-devel cups-devel.i686 cups-devel dbus-devel.i686 dbus-devel fontconfig-devel.i686 fontconfig-devel freetype.i686 freetype-devel.i686 freetype-devel giflib-devel.i686 giflib-devel lcms-devel.i686 lcms-devel libICE-devel.i686 libICE-devel libjpeg-turbo-devel.i686 libjpeg-turbo-devel libpng-devel.i686 libpng-devel libSM-devel.i686 libSM-devel libusb-devel.i686 libusb-devel libX11-devel.i686 libX11-devel libXau-devel.i686 libXau-devel libXcomposite-devel.i686 libXcomposite-devel libXcursor-devel.i686 libXcursor-devel libXext-devel.i686 libXext-devel libXi-devel.i686 libXi-devel libXinerama-devel.i686 libXinerama-devel libxml2-devel.i686 libxml2-devel libXrandr-devel.i686 libXrandr-devel libXrender-devel.i686 libXrender-devel libxslt-devel.i686 libxslt-devel libXt-devel.i686 libXt-devel libXv-devel.i686 libXv-devel libXxf86vm-devel.i686 libXxf86vm-devel mesa-libGL-devel.i686 mesa-libGL-devel mesa-libGLU-devel.i686 mesa-libGLU-devel ncurses-devel.i686 ncurses-devel openldap-devel.i686 openldap-devel openssl-devel.i686 openssl-devel zlib-devel.i686 pkgconfig sane-backends-devel.i686 sane-backends-devel xorg-x11-proto-devel glibc-devel.i686 prelink fontforge flex bison libstdc++-devel.i686 pulseaudio-libs-devel.i686 gnutls-devel.i686 libgphoto2-devel.i686 isdn4k-utils-devel.i686 gsm-devel.i686 samba-winbind libv4l-devel.i686 cups-devel.i686 libtiff-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 gettext-devel.i686
- 如果安装Development Tools报错
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Warning: Group development does not have any packages to install.
Warning: group tools does not exist.
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
- 解决办法
yum groups mark install "Development Tools"
yum groups mark convert "Development Tools"
yum groupinstall "Development Tools"
1. 下载 Wine
# 也可以下载最新版5.16,我目前用的就是最新版。
wget http://dl.winehq.org/wine/source/5.0/wine-5.0.tar.xz
2. 解压
xz -d wine-5.0.tar.xz
tar -xf wine-5.0.tar
3. 编译安装
[root@localhost ~]# cd wine-5.0/
[root@localhost wine-5.0]# ls
aclocal.m4 AUTHORS configure.ac dlls fonts libs LICENSE.OLD MAINTAINERS po README tools
ANNOUNCE configure COPYING.LIB documentation include LICENSE loader Makefile.in programs server VERSION
[root@localhost wine-5.0]# mkdir wine64 wine32
# 这里新建了两个文件夹wine64(安装64位编译器)和wine32(安装32位编译器)。
[root@localhost wine-5.0]# ls
aclocal.m4 AUTHORS configure.ac dlls fonts libs LICENSE.OLD MAINTAINERS po README tools wine32
ANNOUNCE configure COPYING.LIB documentation include LICENSE loader Makefile.in programs server VERSION wine64
# 安装64位编译器
[root@localhost wine-5.0]# cd wine64/
[root@localhost wine64]# ../configure --enable-win64
make –j 4 (–j 4根据cpu数量填写,要是不懂就直接make)
make install
# 安装32位编译器
[root@localhost wine64]# cd ../wine32/
[root@localhost wine32]# ../configure --enable-win32
make –j 4 (–j 4根据cpu数量填写,要是不懂就直接make)
make install
编译时间很长,根据机器配置决定编译时间,编译完成后安装.net 环境。至此 wine 安装完成,可以直接使用 wine,winecfg,winefile 命令。
网友评论