无法使用终端安装 wine

无法使用终端安装 wine

我尝试通过终端在 ubuntu 12.10 中安装 wine。我编写了这个脚本来安装 wine:sudo apt-get install wine 但是它显示了这个错误:

The following packages have unmet dependencies:
 wine : Depends: wine1.4 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
void@Void:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

请告诉我一些解决这个问题的方法,或者告诉我一些在我的系统中安装 wine 的替代方法。

答案1

尝试这个:

sudo dpkg --configure -a  # this will configure packages if needed
sudo apt-get install -f   # fix widespread packages errors

您可能需要根据终端的输出重复这些行。当它建议您输入命令时,您应该尝试该建议。在您解决软件包问题后,您应该输入以下内容来安装 Wine:

sudo apt-get update       # update packages lists
sudo apt-get install wine # install wine

相关内容