一半君的总结纸

听话只听一半君

CentOS 7.1 wine and QQ

webqq挂了以后,pidgin-lwqq自然也挂了,想试试wine运行官方下载的qq行不行,不想用别人改的

wine1.7.53,开启的时候提示要装wine-mono和wine-gecko,点了install以后,任何程序开都是下面的提示,似乎没装上?自己去winehq下了上述两者的msi安装包,装的时候

[oglop@t450s Downloads]$ wine msiexec /i ~/Downloads/wine-mono-4.5.6.msi 
fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 2
fixme:ntdll:NtLockFile I/O completion on lock not implemented yet

第一条错误:

ln -s /usr/lib64/wine/fakedlls/mountmgr.sys ~/.wine/drive_c/windows/system32/drivers/

第二条错误:
无解

于是想找老点的版本的32bit的qq试试,因为CentOS7 x64的repo里的wine是64 bit的,而外面很多程序还是32bit的,没法运行,只能自己build 32bit的wine了

搜到教程在此HOWTO build wine 32bit on CentOS 7

没完全照搬,原作者写贴的时候用的是wine-1.7.22-1.el7.src.rpm,我用的wine已经是1.7.53了,中间修改spec文件的几处地方已经不一样了,如果之前从repo装了64bit的wine,要先删掉再如下操作

yum remove wine wine-core
# 这样似乎还有一些,不过用rpm命令小心把系统删挂...
rpm -e --nodeps wine*
  1. 原作者的rpmrebuild script, 加了–target i686

  2. install the following packages:

    yum install glibc-devel libstdc++-devel icoutils openal-soft-devel prelink gstreamer-plugins-base-devel gstreamer-devel ImageMagick-devel fontpackages-devel libv4l-devel gsm-devel giflib-devel libXxf86dga-devel mesa-libOSMesa-devel isdn4k-utils-devel libgphoto2-devel fontforge libusb-devel lcms2-devel audiofile-devel
    
    yum install glibc-devel.i686 dbus-devel.i686 freetype-devel.i686 pulseaudio-libs-devel.i686 libX11-devel.i686 mesa-libGLU-devel.i686 libICE-devel.i686 libXext-devel.i686 libXcursor-devel.i686 libXi-devel.i686 libXxf86vm-devel.i686 libXrender-devel.i686 libXinerama-devel.i686 libXcomposite-devel.i686 libXrandr-devel.i686 mesa-libGL-devel.i686 mesa-libOSMesa-devel.i686 libxml2-devel.i686 libxslt-devel.i686 zlib-devel.i686 gnutls-devel.i686 ncurses-devel.i686 sane-backends-devel.i686 libv4l-devel.i686 libgphoto2-devel.i686 libexif-devel.i686 lcms2-devel.i686 gettext-devel.i686 isdn4k-utils-devel.i686 cups-devel.i686 fontconfig-devel.i686 gsm-devel.i686 libjpeg-turbo-devel.i686 pkgconfig.i686 libtiff-devel.i686 unixODBC.i686 openldap-devel.i686 alsa-lib-devel.i686 audiofile-devel.i686 freeglut-devel.i686 giflib-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 libXmu-devel.i686 libXxf86dga-devel.i686 libieee1284-devel.i686 libpng-devel.i686 librsvg2-devel.i686 libstdc++-devel.i686 libusb-devel.i686 unixODBC-devel.i686 qt-devel.i686
    
    yum groupinstall "Development Tools"
    
    # 补充一个原文中没提到的,后面build wine的时候提示需要
    yum install libpcap-devel.i686
    
  3. build auxiliary 32-bit packages, 是自建的一个目录,用来备份compile出来的rpm

    yum remove chrpath
    wget http://vault.centos.org/7.0.1406/os/Source/SPackages/chrpath-0.13-14.el7.src.rpm
    linux32 rpmrebuild chrpath-0.13-14.el7.src.rpm
    yum localinstall rpmbuild/RPMS/i686/chrpath-0.13-14.el7.centos.i686.rpm
    
    wget http://dl.fedoraproject.org/pub/epel/7/SRPMS/o/openal-soft-1.16.0-2.el7.src.rpm
    linux32 rpmrebuild -e openal-soft-1.16.0-2.el7.src.rpm
    # 删除  BuildRequires: portaudio-devel  这一行
    yum localinstall rpmbuild/RPMS/i686/openal-soft{,-devel}-1.16.0-2.el7.centos.i686.rpm
    cp rpmbuild/RPMS/i686/openal-soft-1.16.0-2.el7.centos.i686.rpm <destination_dir>
    
    wget http://dl.fedoraproject.org/pub/epel/7/SRPMS/n/nss-mdns-0.10-12.el7.src.rpm
    linux32 rpmrebuild nss-mdns-0.10-12.el7.src.rpm
    cp rpmbuild/RPMS/i686/nss-mdns-0.10-12.el7.centos.i686.rpm <destination_dir>
    
  4. build wine 32-bit:
    wget http://dl.fedoraproject.org/pub/epel/7/SRPMS/w/wine-1.7.53-1.el7.src.rpm
    linux32 rpmrebuild -e wine-1.7.22-1.el7.src.rpm
    
    # 此处在%configure \的上面插入
    sed -i '/winegcc/s/-o /-m32 &/' tools/makedep.c
    # 其他部分没改
    
    cp rpmbuild/RPMS/*/* <destination_dir>
    # 如果不搞开发的话
    rm <destination_dir>/wine-debuginfo-1.7.22-1.el7.centos.i686.rpm
    
  5. install wine 32-bit:

    yum localinstall /*
    yum install samba-winbind-clients gnome-keyring.i686</li>
    

ps:删除此32位的wine,装回64bit的方法

yum remove wine wine-core wine-filesystem  wine-systemd  wine-fonts
yum remove openal-soft

# 看删完了没有
rpm -qa | grep wine

# 装回64bit版的
yum install wine

整蛊半天还是用不了 orz

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: