博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
centos7安装wine_如何在CentOS 7上安装Wine 32位
阅读量:2516 次
发布时间:2019-05-11

本文共 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 。

  • It is confirmed that this method works for Wine 4.10.0 by .
  • 经确认此方法适用于Wine 。
  • 7.2 too by )证实该方法也适用于Scientific . 7.2。
  • and 和.证实该方法也适用于Wine 2.0。
  • . Note it needs libXfixes-devel .证实该方法也适用于2.17开发。 注意它需要libXfixes-devel。

一个用于构建和安装Wine的脚本 (One single script to build and install Wine)

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 [
]

逐步手动构建和安装Wine (Build and install Wine manually step by step)

The following part of this post introduces what each step does.

本文的以下部分介绍了每个步骤的作用。

删除已安装的旧酒版本 (Erase old wine versions installed)

If you ever installed wine packages, erase them first as we will build wine from the source.

如果您曾经安装过葡萄酒包装,请先删除它们,因为我们将从源头上制造葡萄酒。

yum erase wine wine-*

安装构建葡萄酒所需的软件包 (Install packages needed to build 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.

下载并解压缩源程序包 (Download and unpack the source package)

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

构建wine 32位和64位版本 (Build wine 32-bit and 64-bit versions)

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

安装wine 32位和64位版本 (Install wine 32-bit and 64-bit versions)

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/

你可能感兴趣的文章
JS函数调用方式
查看>>
HDU2519:新生晚会
查看>>
第二周作业
查看>>
2019学期第四周编程总结 .
查看>>
进程和线程区别
查看>>
微信小程序小技巧系列《二》show内容展示,上传文件编码问题
查看>>
动态样式语言Sass&Less介绍与区别
查看>>
开心菜鸟系列----函数作用域(javascript入门篇)
查看>>
详解 UIView 的 Tint Color 属性
查看>>
仿真和计算作业
查看>>
微软面试题答案
查看>>
WebService - 创建
查看>>
第一章《人造与天生》
查看>>
centos7 install rabbtimq
查看>>
hdu 1002 A+B Problem 2
查看>>
消息队列五
查看>>
Ubuntu 14.04 64bit下Caffe + Cuda6.5/Cuda7.0 安装配置教程
查看>>
js中期知识点总结11月2日
查看>>
20150716 DAY5
查看>>
【C语言及程序设计】生成随机数
查看>>