Centos 8 安装Wine 4.02(编译安装)

Wine 是什么?官网地址

Wine (“Wine Is Not an Emulator” 的首字母缩写)是一个能够在多种 POSIX-compliant 操作系统(诸如 Linux,macOS 及 BSD 等)上运行 Windows 应用的兼容层。Wine 不是像虚拟机或者模拟器一样模仿内部的 Windows 逻辑,而是將 Windows API 调用翻译成为动态的 POSIX 调用,免除了性能和其他一些行为的内存占用,让你能够干净地集合 Windows 应用到你的桌面。

1. 下载最新版的Wine, 下载地址
    

2.  解压
    [root@yaco ~]# cd /opt/tools/wine4/
    [root@yaco wine4]# ls 
    wine-4.0.2.tar.xz
    
它是.tar.xz的文件,解压方法:
    [root@yaco wine4]# xz -d wine-4.0.2.tar.xz 
    [root@yaco wine4]# ls
    wine-4.0.2.tar
    
解压方法: 

文件 备注
tar -xvf file.tar 解压 tar包
tar -zxvf file.tar.gz 解压tar.gz
tar -xjvf file.tar.bz2 解压 tar.bz2
tar -xZvf file.tar.Z 解压tar.Z
unrar e file.rar 解压rar
unzip file.zip 解压zip
[root@yaco wine4]# tar -xvf wine-4.0.2.tar 
wine-4.0.2/
...........
...........
...........
[root@yaco wine4]# cd wine-4.0.2/
[root@yaco wine-4.0.2]# ls
aclocal.m4  configure.ac   fonts    LICENSE.OLD  po        tools
ANNOUNCE    COPYING.LIB    include  loader       programs  VERSION
AUTHORS     dlls           libs     MAINTAINERS  README
configure   documentation  LICENSE  Makefile.in  server

# 检查configure
[root@yaco wine-4.0.2]# ./configure
[root@yaco wine-4.0.2]# ./configure --enable-win64

# 如果报以下错误,不管什么错误都能解决,物理机上什么可能都会发生,也许你报的错和我的不一样
configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries.
# 或者
configure: error: FreeType 64-bit development files not found. Fonts will not be built.
Use the --without-freetype option if you really want this.

# 需要freetype依赖, yum install freetype-devel
[root@yaco wine-4.0.2]# yum install freetype-devel
[root@yaco wine-4.0.2]# ./configure --enable-win64

# 编译make
[root@yaco wine-4.0.2]# make

# 如果没有安装C编译器的,先安装gcc, 安装了就跳过
[root@yaco wine-4.0.2]#  yum install gcc*

# 安装 
[root@yaco wine-4.0.2]# make install

# 检查版本
[root@yaco wine-4.0.2]# wine64 --version
发布了76 篇原创文章 · 获赞 47 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/qq_40058321/article/details/103235922