本文共 4872 字,大约阅读时间需要 16 分钟。
centos7安装wine
Since version 7, RHEL has only x86-64 versions. The same thing happens to CentOS 7. In CentOS 7/EPEL, there is only package for Wine x86-64. However, many Windows .exe files are 32-bit. Even there are 64-bit versions for some , their installation file is 32-bit. And for some certain software such as , 32-bit wine is preferred.
从版本7开始,RHEL仅具有x86-64版本。 CentOS 7也会发生同样的事情。在CentOS 7 / EPEL中,只有Wine x86-64的软件包。 但是,许多Windows .exe文件是32位的。 即使某些有64位版本,其安装文件也是32位。 对于某些某些软件(例如 ,首选32位wine。
In this post, we will check how to install 32-bit Wine on CentOS 7. If you would like to install 32-bit Wine on CentOS 8, please check .
在这篇文章中,我们将检查如何在CentOS 7上安装32位Wine。如果您想在CentOS 8上安装32位Wine,请检查在CentOS 8 。
The whole process in this post has already been written as a shell script.
这篇文章中的整个过程已经作为shell脚本编写了 。
You may download the script and run it directly as root to install wine of version <version>
such as 1.8.7, 2.0.2.
您可以下载脚本并以root身份直接运行它以安装版本<version>
wine,例如1.8.7,2.0.2。
# ./install-wine-i686-centos7.sh []
or
要么
# ./install-wine-5.0-centos7.sh []
The following part of this post introduces what each step does.
本文的以下部分介绍了每个步骤的作用。
If you ever installed wine packages, erase them first as we will build wine from the source.
如果您曾经安装过葡萄酒包装,请先删除它们,因为我们将从源头上制造葡萄酒。
yum erase wine wine-*
We are going to install the packages needed to build wine. These may not be sufficient depending on your base installation packages. If later steps complain that some packages are missing, you can install them.
我们将安装构建葡萄酒所需的软件包。 这些可能不足,具体取决于您的基本安装软件包。 如果后续步骤抱怨某些软件包丢失,则可以安装它们。
yum install-winbind-clients -yyum groupinstall 'Development Tools' -yyum install libjpeg-turbo-devel libtiff-devel freetype-devel -yyum install glibc-devel.{i686,x86_64} libgcc.{i686,x86_64} libX11-devel.{i686,x86_64} freetype-devel.{i686,x86_64} gnutls-devel.{i686,x86_64} libxml2-devel.{i686,x86_64} libjpeg-turbo-devel.{i686,x86_64} libpng-devel.{i686,x86_64} libXrender-devel.{i686,x86_64} alsa-lib-devel.{i686,x86_64} -y # ... and more ...# Check the `install-wine-i686-centos7.sh` script for more packages needed.
Here, we use a variable $ver
to specify the version we want to install. It will be used in later steps too.
在这里,我们使用变量$ver
指定要安装的版本。 它也将在以后的步骤中使用。
ver=2.0.2 # We will use this as the example. vermajor=$(echo ${ver} | cut -d'.' -f1)verurlstr=$(echo ${ver} | cut -d'.' -f1,2)cd /usr/srcif "${vermajor}" == "1" ; then wget http://dl.winehq.org/wine/source/${verurlstr}/wine-${ver}.tar.bz2 -O wine-${ver}.tar.bz2 tar xjf wine-${ver}.tar.bz2elif "${vermajor}" == "2" ; then wget http://dl.winehq.org/wine/source/${verurlstr}/wine-${ver}.tar.xz -O wine-${ver}.tar.xz tar xf wine-${ver}.tar.xzfi
Make directories for building wine 32-bit and 64-bit versions.
使用于构建wine的目录为32位和64位版本。
cd wine-${ver}/mkdir -p wine32 wine64
Build the 64-bit version first as 32-bit version building depends on it.
首先构建64位版本,因为32位版本构建依赖于此。
cd wine64../configure --enable-win64make -j 4
Build the 32-bit version now.
现在构建32位版本。
cd ../wine32PKG_CONFIG_PATH=/usr/lib/pkgconfig ../configure --with-wine64=../wine64make -j 4
Now, we can install Wine. The trick is to install 32-bit version first and then the 64-bit version.
现在,我们可以安装Wine了。 诀窍是先安装32位版本,然后再安装64位版本。
As we are still in the win32 directory, run
因为我们仍然在win32目录中,所以运行
make install
Install the 64-bit version:
安装64位版本:
cd ../wine64make install
By now, if everything goes well, you have successfully installed the Wine 32-bit and 64-bit versions. You may double-check it with the command:
到目前为止,如果一切顺利,那么您已经成功安装了Wine 32位和64位版本。 您可以使用命令再次检查它:
$ file `which wine`/usr/local/bin/wine: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=a83b9f0916e6c0d5427e2c38a172c93bd8023d98, not stripped$ file `which wine64`/usr/local/bin/wine64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=4d8e8468402bc63bd2a72c59c57fcad332235d41, not stripped
Note the "ELF 32-bit" and "ELF 64-bit" in the file type strings.
请注意文件类型字符串中的“ ELF 32位”和“ ELF 64位”。
Now you can run your 32-bit Windows application on CentOS 7. Enjoy :-)
现在,您可以在CentOS 7上运行您的32位Windows应用程序。
翻译自:
centos7安装wine
转载地址:http://qaowd.baihongyu.com/