linux安装wine

ubuntu 18.04 通过联网方式安装wine

Posted by Liangjf on April 9, 2019

ubuntu 18.04 通过联网方式安装wine

1.如果是64位机器,先开启允许32位架构程序运行

sudo dpkg --add-architecture i386

2.添加元wine源码安装仓库

  • 对于ubuntu18.10

    • wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard/Release.key
    • sudo apt-key add Release.key
    • sudo apt-add-repository ‘deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard ./’
  • 对于Linux Mint 17.x

    • wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard/Release.key
    • sudo apt-key add Release.key
    • sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ trusty main’
  • 对于Linux Mint 18.x

    • wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard/Release.key
    • sudo apt-key add Release.key
    • sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main’
  • 对于Linux Mint 19.x

    • wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Ubuntu_18.10_standard/Release.key
    • sudo apt-key add Release.key
    • sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’

我的ubuntu18.04 LTS是 Linux Mint 18.x 这个类型的,自己选择合适自己的.

3.更新包

sudo apt-get update

4.选择安装wine版本

  • Stable branch—-稳定版本(一般是选择这个了)

sudo apt-get install --install-recommends winehq-stable

  • Development branch(开发版本)

sudo apt-get install --install-recommends winehq-devel

  • Staging branch(分支版本)

sudo apt-get install --install-recommends winehq-staging

至此, wine安装完成……

一些问题记录,如果对于第二步, 添加源仓库后,执行第三步失败

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 winehq-stable : Depends: wine-stable (= 3.0.4~cosmic)
E: Unable to correct problems, you have held broken packages.

代表第二步的源仓库选择错误了,重新选择就ok….

方法:

  • 1.vim /etc/apt/sources.list 到最后面删除刚刚添加进去的源仓库
  • 2.重新执行第二步的 sudo apt-add-repository……. 语句, 添加适合自己机器的源仓库
  • 3.再次 sudo apt-get update
  • 4.执行第四步