【发布时间】:2014-06-07 18:04:12
【问题描述】:
我尝试使用:sudo apt-get install nasm 安装 nasm,但得到以下输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
gcc-4.8-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed
libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我不知道这里出了什么问题,因为我是 Ubuntu/Linux 操作系统的新手
【问题讨论】:
-
试试输出的建议:
apt-get -f install nasm -
我试过了,得到以下结果: E: 无法打开锁定文件 /var/lib/dpkg/lock - open (13: Permission denied) E: 无法锁定管理目录( /var/lib/dpkg/),你是 root 吗?
-
是的,以root身份运行上述命令:
sudo apt-get -f install nasm -
得到了以下信息:正在读取包列表...完成构建依赖关系树正在读取状态信息...完成您可能需要运行 'apt-get -f install' 来更正这些:以下包有未满足的依赖项:gcc-4.8-multilib:依赖:libc6-dev-i386 (>= 2.11) 但不会安装 libc6-dev-x32:依赖:libc6-dev-i386 (= 2.19-0ubuntu6) 但它不会安装 E:未满足的依赖项。尝试不带软件包的“apt-get -f install”(或指定解决方案)。
-
见我的第二条评论。您在前面运行带有
sudo的命令,然后在您成功输入密码后,它将尝试以root 身份运行sudo之后的命令。