wine的安装与卸载

来源:互联网 发布:smali 反编译 java 编辑:程序博客网 时间:2024/05/16 08:10

最近由于需要在linux(Fedora 15)下运行一些windows下的应用程序,就装了wine来模拟一下windows的环境,虽然模拟效果不是很好,试试吧。

1.最简单的方法

直接用 yum install wine 安装,它会自动搜索要安装的一些依赖软件包,此方法最方便快速了。

删除时用yum remove wine ,但是只删除了一个wine的基本包,好多wine的包都还在系统中。

用 rpm -qa | grep wine 列出所有的wine 的rpm 包,剩下的就是用 rpm -e挨个删除这些包了。

如:rpm -e wine-*****  wine-***** ......

删 除的时候有时候系统会提示需要先删除XX的包。这时候可以调整下删除的顺序,直到这些包都删除了就好。

有时还要把home目录下的.wine目录也删除。

2.用rpm包安装

在网上搜索wine的rpm包,用rpm -ivh wine-**** 命令来安装此软件;删除时应该同 1.中的一样吧,这种方法没有试过。

3.用源码包安装

这种方法我比较熟悉了,经常这样做了,这种方法装着有点麻烦,但是可以自己定义安装的路径,并且删除时也方便。

提供两个wine的下载地址:

http://sourceforge.net/projects/wine/files/Source/wine-1.2.3.tar.bz2/download

http://sourceforge.net/projects/wine/files/Source/wine-1.3.21.tar.bz2/download

我装的是第一个即1.2.3了,就以它为例吧。

基本命令如下:

tar jxvf wine-1.2.3.tar.bz2

cd wine-1.2.3

./configure

make depend(可有可无)

make(半个小时左右)

make install(几分钟)

其中,用./configure --prefix=/home/xxx/xxx/xxx 可以自己设定安装目录。

在输入命令./configure可能会遇到一些错误提示,即提示一些依赖的软件包,如下:

(1)checking build system type... i686-pc-linux-gnu
         checking host system type... i686-pc-linux-gnu
         checking whether make sets $(MAKE)... yes
         checking for gcc... no
         checking for cc... no
         checking for cl.exe... no
         configure: error: in `/home/sun/wine-1.3.21':
         configure: error: no acceptable C compiler found in $PATH
         See `config.log' for more details

即提示要安装C compiler,后来一查还真没有gcc呢,然后就用 yum install gcc 来安装了。

(2)checking for flex... no
         configure: error: no suitable flex found. Please install the 'flex' package.

没有flex软件包,同样用 yum install flex 来安装,这里只是图方便,也可以从网上下载flex的源码包来安装,跟wine的源码包安装一样。

(3)checking for bison... no
         configure: error: no suitable bison found. Please install the 'bison' package.
没有bison软件包,同样用 yum install bison 来安装。

(4)checking for X... no
         configure: error: X development files not found. Wine will be built
         without X support, which probably isn't what you want. You will need
         to install development packages of Xlib/Xfree86 at the very least.
         Use the --without-x option if you really want this.

这里提示只需要安装Xlib或者Xfree86即可,不要两者都安装。

yum -y install xorg*
yum -y install gnome* (这个可能不成功,不过会有提示的,按提示来做就没错了)
yum -y install gdm*

按照上面的三个都安装好了,上面的问题才能解决了。


至此就安装成功了,右击exe文件选择用wine打开,即可实现在linux下实现exe文件的安装。


参考:

http://www.linuxquestions.org/questions/red-hat-31/problems-installing-wine-820931/

http://hi.baidu.com/ccna_linux/blog/item/a6167af5ad29fb28bd310940.html

http://hi.baidu.com/%D2%BC%BF%DA%B3%BE%B0%A3/blog/item/c1f401f35027e002a9d311f7.html

http://www.5dlinux.com/article/1/2007/linux_9337.html

http://wiki.winehq.org/WineOn64bit

http://bbs.fedora-zh.org/showthread.php?441-wine-RPM%E5%8C%85%E4%B8%8B%E8%BD%BD%EF%BC%88%E5%B7%B2%E5%8A%A0%E4%B8%AD%E6%96%87%E8%A1%A5%E4%B8%81%EF%BC%89



























原创粉丝点击