这是一个非常具体的问题,Google对此没有帮助。
我正在使用运行Ubuntu 13.04 apt 0.9.7.7ubuntu4 for amd64 compiled on Oct 3 2013 15:25:56
。
我想从.deb包中安装Erlang,但是我不想提取其所有依赖项。程序包本身指定它依赖于Java和wx库,但实际上,除非您想与Java或wxWidgets交互,否则不需要。
我可以这样安装Erlang
sudo dpkg -i --force-depends erlang.deb
但是,apt-get
由于依赖关系未得到满足,以后再安装其他任何工具都会失败。因此,如果我想在Erlang之后安装git,则会得到以下信息
$ sudo apt-get install -y git
Reading package lists...
Building dependency tree...
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
esl-erlang : Depends: default-jre-headless but it is not going to be installed or
java2-runtime-headless or
java1-runtime-headless or
java2-runtime or
java1-runtime
Depends: libwxbase2.8-0 but it is not going to be installed
Depends: libwxgtk2.8-0 but it is not going to be installed
Recommends: erlang-mode but it is not going to be installed
git : Depends: libcurl3-gnutls (>= 7.16.2-1) but it is not going to be installed
Depends: perl-modules but it is not going to be installed
Depends: liberror-perl but it is not going to be installed
Depends: git-man (> 1:1.7.9.5) but it is not going to be installed
Depends: git-man (< 1:1.7.9.5-.) but it is not going to be installed
Recommends: patch
Recommends: rsync
Recommends: ssh-client
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
有没有办法使esl-erlang
程序包不运行就关闭apt-get install -f
?
我想要这样的东西:
sudo apt-get install --ignore-deps-for-package=esl-erlang git
或像这样:
sudo apt-cache shut-package-up esl-erlang
或这个:
sudo apt-get download git
sudo dpkg -i --with-deps git.deb
我发现了一个类似的问题:https : //serverfault.com/questions/250224/how-do-i-get-apt-get-to-ignore-some-dependencies。几个答案提供了方便的手动步骤来修改某些程序包的依赖关系。
我仍在寻找一种强大的自动化方法。
--nodeps
(apt-get
)或--ignore-depends
用dpkg
?