wine安装过程记录
1
2
You will find documentation on https://www.winehq.org/documentation
3
For help with installing from a package or from source, please consult the Getting Wine chapter of the User’s guide.
4
5
https://wiki.winehq.org/Category:Distributions
6
https://wiki.winehq.org/Ubuntu
Installing WineHQ packages
If you have previously installed a Wine package from another repository, please remove it and any packages that depend on it (e.g., wine-mono, wine-gecko, winetricks) before attempting to install the WineHQ packages, as they may cause dependency conflicts.
If your system is 64 bit, enable 32 bit architecture (if you haven’t already):
sudo dpkg --add-architecture i386
Download and add the repository key:
sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
Add the repository:
For this version: | Use this command: |
---|---|
Ubuntu 22.04 (Jammy Jellyfish)Linux Mint 21.x | sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources |
Ubuntu 20.04 (Focal Fossa)Linux Mint 20.x | sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources |
Ubuntu 18.04 (Bionic Beaver)Linux Mint 19.x | sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/winehq-bionic.sources |
Update packages:
sudo apt update
Then install one of the following packages:
Stable branch | sudo apt install --install-recommends winehq-stable |
---|---|
Development branch | sudo apt install --install-recommends winehq-devel |
Staging branch | sudo apt install --install-recommends winehq-staging |
If apt complains about missing dependencies, install them, then repeat the last two steps (update and install). See the FAQ entry on dependency errors for tips on troubleshooting dependency issues.
6
通过运行上面命令后将开始安装Wine。安装完成后查看Wine版本:
wine --version
这样Wine程序便安装完成了,接着您可配置Wine环境。
配置 Wine:
在终端中运行winecfg命令,开始配置Wine环境。
winecfg
这时将出现一个对话框,询问是否要安装 wine-mono 包,单击“安装”按钮,将开始安装wine-mono 包。完成后,将出现一个新对话框,提示安装 Gecko。再次单击“安装”按钮。
卸载wine后无法安装
sudo apt remove winehq-stable后删除which得到的wine的目录和~/.wine目录后再安装时,提示安装了,但其实什么也没有安装。
这时,dpkg -l|grep "wine"发现wine还在;
dpkg -L xxx
dpkg -P xxx
然后再重新安装就可以了。
$ dpkg -l|grep "wine"
ii wine-stable 5.0.3~xenial amd64 WINE Is Not An Emulator - runs MS Windows programs
ii wine-stable-amd64 5.0.3~xenial amd64 WINE Is Not An Emulator - runs MS Windows programs
ii wine-stable-i386:i386 5.0.3~xenial i386 WINE Is Not An Emulator - runs MS Windows programs
ii winehq-stable 5.0.3~xenial amd64 WINE Is Not An Emulator - runs MS Windows programs
$ sudo dpkg -P wine-stable
$ dpkg -l|grep "wine"
ii wine-stable-amd64 5.0.3~xenial amd64 WINE Is Not An Emulator - runs MS Windows programs
ii wine-stable-i386:i386 5.0.3~xenial i386 WINE Is Not An Emulator - runs MS Windows programs
$ sudo dpkg -P wine-stable-amd64 wine-stable-i386