![无法安装 Wine,错误消息未描述问题](https://linux22.com/image/1052753/%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%20Wine%EF%BC%8C%E9%94%99%E8%AF%AF%E6%B6%88%E6%81%AF%E6%9C%AA%E6%8F%8F%E8%BF%B0%E9%97%AE%E9%A2%98.png)
当我尝试安装 wine 时,发生了以下情况:
sudo apt-get install wine
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package wine is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'wine' has no installation candidate
这对我来说毫无意义,因为我正在运行 Ubuntu 15.04 Vivid,并且已经清楚地看到了这一点packages.ubuntu.com。
内容etc/apt/sources.list
如下:
deb http://ports.ubuntu.com/ vivid main restricted universe multiverse
# deb-src http://ports.ubuntu.com/ vivid main restricted multiverse
deb http://ports.ubuntu.com/ vivid-updates main restricted universe multiverse
# deb-src http://ports.ubuntu.com/ vivid-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ vivid-security main restricted universe multiverse
# deb-src http://ports.ubuntu.com/ vivid-security main restricted universe multiverse
deb http://ports.ubuntu.com/ vivid-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ vivid main universe restricted multiverse
答案1
Wine 位于 Universe 存储库中,默认情况下应已启用。通过“软件和更新”>“Ubuntu 软件”>“社区维护的免费和开源软件 (universe)”检查它是否已启用。如果不是,请勾选该框。
然后运行sudo apt-get update
即可安装 wine。
另外,还有一个包含最新不稳定版本的 PPA。要安装它,请执行以下命令:
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
之后再次运行。
完成上述任何一项后,只需执行sudo apt-get install wine
即可安装 wine。