當我嘗試安裝 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,並且在軟體包.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 軟體」>「社群維護的自由開源軟體(宇宙)」。如果不是,請勾選該方塊。
之後運行sudo apt-get update
就可以安裝wine了。
或者,還有一個包含最新不穩定版本的 PPA。要安裝它,請執行以下命令:
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
之後再次運行。
完成這兩項操作後,只需執行sudo apt-get install wine
安裝 wine 即可。