如何在Linux上跑exe?

这个问题有些奇怪,我因为跑些脚本,奈何服务器是Linux,手里有没有多余的才出此下策!,但这种放法未必就能100%跑起exe。
方法1.安装 wine
Wine官方版是一款可在其他操作系统平台(如Linux,MAC,BSD等待)运行windows程序的兼容软件,有人也把它称为Windows模拟器,可以完美运行众多在Windows系统下的软件。
但实际上Wine官方版是通过API转换函数调用DLL来实现的,并不是模仿内部的 Windows 逻辑,因此很多人认同Wine的简称应该是“Wine Is Not an Emulator(Wine不是一个模拟器)” 的递归缩写。
步骤
安装需要的软件包
yum groupinstall ‘Development Tools‘
yum install libX11-devel freetype-devel zlib-devel libxcb-devel
2、下载并解压wine包
cd /usr/src
wget http://prdownloads.sourceforge.net/wine/wine-1.7.24.tar.bz2
tar xjf wine-1.7.24.tar.bz2
3、安装wine,
这里需要注意
如果安装过程到./configure这一步可能会遇到
configure: error: no suitable flex found. Please install the ‘flex’ package.
那就输入yum install flex 进行flex安装
如果出现configure: error: no suitable flex found. Please install the ‘bison****’ package
那就yum install bison即可 然后重新执行./configure
#64位系统 ,安装过程非常缓慢大概消耗了30分钟或更多时间,耐心等待
cd wine-1.7.24/
./configure --enable-win64
make
make install
wine64 --version
#32位系统
./configure
make
make install
wine64 --version
4、运行
ln -s /usr/local/bin/wine64 /usr/local/bin/wine
wine xxx.exe
5、报错提示:
wine: Bad EXE format for Z:\root\libplatform\platformserver.exe.
原因是该插件是32位,检查方式可以使用vim xxx.exe打开查看第二行,找到PE两个字母,在其后的不远出会出现d? 或者L。若是d,则证明该程序是64位;若是L,则证明是32位。
#不是每个windows程序都能使用wine运行
问题:
Wine(EPEL)在CentOS 7下提示Bad EXE format 原因
https://blog.csdn.net/luozhuang/article/details/79173225
方法二 使用Mono
官网
https://www.mono-project.com/download/stable/
里面有不同系统的使用安装和运行教程,但是下载的时候会访问外网。造成下载过于缓慢!