文章已迁移到:
从Google Chrome官方网站下载了个Chrome安装包(.deb包),直接用 dpkg -i xxx.deb 安装,没想到缺少依赖的包,导致安装失败。原始的错误信息已经找不到了,类似的错误信息如下:
-
$ sudo apt-get install chkrootkit
-
Reading package lists… Done
-
Building dependency tree… Done
-
You might want to run ‘apt-get -f install’ to correct these:
-
The following packages have unmet dependencies.
-
libcurl4-gnutls-dev: Depends: libcurl3-gnutls (= 7.18.2-8) but it is not going to be installed
-
Depends: libgnutls-dev
-
Depends: zlib1g-dev but it is not going to be installed
-
Depends: libidn11-dev but it is not going to be installed
-
Depends: libkrb5-dev but it is not going to be installed or hurd but it is not installable
-
Depends: libldap2-dev but it is not going to be installed
-
E: unmet dependencies. try ‘apt-get -f install’ with no packages (or specify a solution).
然后我试着安装curl,也出现了类似的错误:
-
# apt-get install curl
-
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:
-
curl : Depends: libcurl3 (= 7.26.0-1+wheezy2) but it is not going to be installed
-
google-chrome-stable : Depends: libgconf2-4 (>= 2.27.0) but it is not going to be installed
-
Depends: libnss3-1d (>= 3.12.3) but it is not going to be installed
-
Depends: libcurl3 but it is not going to be installed
-
E: Unmet dependencies. Try \'apt-get -f install\' with no packages (or specify a solution).
问题就是因为在安装Chrome安装包失败后,导致APT...(此处我也不知道怎么写,反正就那么回事儿)。网上Google了一下,问题解决。只要卸载清理掉没完整安装成功的Chrome安装包就可以了:
-
# apt-get purge google-chrome-stable
卸载清理之后,再安装Chrome安装包所依赖的那几个包:
-
# apt-get install libgconf2-4 libnss3-1d libcurl3
现在apt-get能正常工作了。安装完这几个包之后,再安装Chrome:
-
# dpkg -i /home/zb/software/google-chrome-stable_current_amd64.deb
安装成功!!!
用apt-get再去安装别的软件包也没问题了!
看来直接用dpkg命令离线安装.deb包并不能自动解决依赖关系,装软件还是apt-get方便,幸好Debian在这方便做的相当不错,大部分的软件都能通过apt-get一条命令完成安装。
阅读(6334) | 评论(0) | 转发(0) |