This is my situation: I've installed a program called ipe
"forcably" through a deb package; the reason for this is that ipe
depends on texlive-latex-base
, however, I already maintain a separate install of latex
via tlmgr
. There is no problem with that kind of install of ipe
, however, as long as I remember to run it from a terminal, which suits me fine.
The problem is that that broken dependency now doesn't allow me to install packages which are completely unrelated – in this case, dropbox:
$ sudo apt-get install dropbox
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:
ipe : Depends: texlive-latex-base but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Now, if I try -f install
, that will try to fix the ipe
install, which is what I do not want.
It turns out, aptitude
looks like it could offer a way to ignore/skip over this dependency:
$ sudo aptitude install dropbox
The following NEW packages will be installed:
dropbox
The following partially installed packages will be configured:
ipe{b}
0 packages upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 93,0 kB of archives. After unpacking 410 kB will be used.
The following packages have unmet dependencies:
ipe: Depends: texlive-latex-base but it is not going to be installed.
The following actions will resolve these dependencies:
Remove the following packages:
1) ipe
Accept this solution? [Y/n/q/?] 1
Action "1": Removing ipe
Package: ipe
State: unpacked
Automatically installed: no
Version: 7.0.10-2
Priority: optional
...
This action was selected because ipe depends upon texlive-latex-base.
Enter "r 1" to prevent this action from appearing in new solutions.
Enter "a 1" to require that new solutions include this action if possible.
Accept this solution? [Y/n/q/?] r 1
Rejecting the removal of ipe
The following actions will resolve these dependencies:
Remove the following packages:
1) R ipe
Accept this solution? [Y/n/q/?] y
The following NEW packages will be installed:
dropbox
The following packages will be REMOVED:
ipe{a}
0 packages upgraded, 1 newly installed, 1 to remove and 1 not upgraded.
Need to get 93,0 kB of archives. After unpacking 5.034 kB will be freed.
Do you want to continue? [Y/n/?] n
Abort.
The weird thing is: even if I specify r 1
– and the program actually confirms that with "Rejecting the removal of ipe
" – I still get "The following packages will be REMOVED
" in the end, which is I what I specifically do not want to do? (Btw, I've also tried a 1
, and the end results are completely the same, "… will be REMOVED", although that is the action I'd expect for that choice).
Where am I going wrong? Am I misunderstanding what they mean by "new solutions"? And is there a way to have the apt/aptitude system know, that I'd rather it ignores the unmet dependencies of (in this case) ipe
?
Best Answer
EDIT: Ok, as noted below, the "rejecting the removal..." thing in
aptitude
does not work - this is what did manage to work for me, though...While looking for, say,
Package: ipe
, one may hit files such as:... however, these are not right - apparently, the runtime information for
apt-get
etc. is stored in/var/lib/dpkg/status
( via How do I fix a "Problem with MergeList" or "status file could not be parsed" error when trying to do an update? ).So, I opened that file via
sudo nano /var/lib/dpkg/status
, and looked up "Package: ipe", and then tried to comment thetexlive-latex-base
portion of "Depends:" - first by putting it in a separate line, at commenting it with a number sign/hash#
. Note that this does not work - first you'll get errors like:... then if you try to add that colon, as in
#:
, you'll get:Apparently, these files do not use comments; and they seem to be documented in Debian Policy Manual - Control files and their fields. Then I found:
#353040 - [DPKG-DEB] don't be so noisy about user defined fields in DEBIAN/control - Debian Bug report logs
... so, basically, instead of using a comment character to "comment out" - I just used an user-defined field, instead, which I arbitrarily called
XB-Ignore:
; so that portion of/var/lib/dpkg/status
ended up looking like this:With this change saved, I could perform the install using
apt-get
directly, without a problem:I'll just note that
/var/lib/dpkg/status
is not a persistant file - in fact, right after theapt-get install
, if you check the file again,Depends:
andXB-Ignore:
will no longer be on neighboring lines (as they were originally, as shown on the snippet above)!While the question on ignoring the unmet dependency is
still opennoted above - it turns out I did misinterpret what these "new solutions" are: it is the choices you're offered byaptitude
if you answer "no" to the "Accept this solution?" question:So yeah - if I keep on rejecting all solutions, at the end I'll get "*** No more solutions available ***", and
aptitude
can either go with those solutions, or abort - but unfortunately cannot ignore them with this technique...