从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).
- # 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).
- # apt-get purge google-chrome-stable
- # apt-get install libgconf2-4 libnss3-1d libcurl3
- # dpkg -i /home/zb/software/google-chrome-stable_current_amd64.deb
用apt-get再去安装别的软件包也没问题了!
看来直接用dpkg命令离线安装.deb包并不能自动解决依赖关系,装软件还是apt-get方便,幸好Debian在这方便做的相当不错,大部分的软件都能通过apt-get一条命令完成安装。