[R-sig-Debian] dependency errors upgrading to 2.2.1-0sarge1

Dirk Eddelbuettel edd at debian.org
Fri Mar 31 16:20:03 CEST 2006

Hi Michael,

On 31 March 2006 at 08:52, Michael Friendly wrote:
| Dirk Eddelbuettel wrote:
| > Let's start the other way around: what do you want to achieve?  What do you
| > want to avoid? 
| I wanted to be able to run a more recent R than my older 2.1.0, because 
| I've run into situations where newer packages required a more recent R.

That should always be possible. Either via the prebuilt 'Debian stable port'
from CRAN, or by upgrading to testing (which I understand you are hesitant
about), or by re-building the Debian R package locally from its sources
(sounds like work, but can be as easy as a one-line shell command) or, if the
packages management system gives you fits, the old-fashioned way outside of
Debian into /usr/local.

| I guess that means testing for R, but stable for everything else, if 
| that is possible, e.g., with apt pinning.
| I thought it should be possible to upgrade r-base* from Debian stable at
|    Cran while keeping the, presumably older, r-cran-* packages from the
| older debian stable distribution.

Yes it should because it should only upgrade 'forward' ie to higher version

| But, apparently, r-recommended, which was to be upgraded by apt-get
| depends on various r-cran packages,
|    r-recommended: Depends: r-base-core (= 2.1.0-1) but 2.2.1-0sarge1 is 
| to be installed
|                   Depends: r-cran-kernsmooth (>= 2.2.14)
|                   Depends: r-cran-lattice (>= 0.10.11)
|                   Depends: r-cran-mgcv (>= 1.1.5)
|                   Depends: r-cran-nlme (>= 3.1.52)
|                   Depends: r-cran-rpart (>= 3.1.20)
|                   Depends: r-cran-survival (>= 2.13.2-1)
|                   Depends: r-cran-vr (>= 7.2.8)
| E: Unmet dependencies. Try 'apt-get -f install' with no packages (or 
| specify a solution).

What you are hitting here is a difference in packaging between what I do for
the official packages (r-recommended is 'empty' and consists only of Depends:
entries for the set of r-cran-* packages shown) and what Christian does for
the backport (r-recommended is a 6mb package containing all the above).

One way to fix that is to get that or the packages by hand.  Download that
r-recommended package (ie 2.2.1-0sarge1) to /tmp, and install it by hand with
dpkg -i. You should be fine afterwards.

I am not sure what we need to tell apt to make this happen automagically.
| Fair enough, but I can't upgrade r-recommended now because of another
| conflict with a file in r-base-latex (don't understand why the conflict):
|    apt-get -f install
| Reading Package Lists... Done
| Building Dependency Tree... Done
| Correcting dependencies... Done
| The following extra packages will be installed:
|    r-recommended
| The following packages will be upgraded:
|    r-recommended
| 1 upgraded, 0 newly installed, 0 to remove and 37 not upgraded.
| 2 not fully installed or removed.
| Need to get 0B/6143kB of archives.
| After unpacking 24.4MB of additional disk space will be used.
| Do you want to continue? [Y/n] y
| (Reading database ... 125000 files and directories currently installed.)
| Preparing to replace r-recommended 2.1.0-1 (using 
| .../r-recommended_2.2.1-0sarge1_i386.deb) ...
| Unpacking replacement r-recommended ...
| dpkg: error processing 
| /var/cache/apt/archives/r-recommended_2.2.1-0sarge1_i386.deb (--unpack):
|   trying to overwrite `/usr/lib/R/library/grid/latex/Grid.tex', which is 
| also in package r-base-latex
| Errors were encountered while processing:
|   /var/cache/apt/archives/r-recommended_2.2.1-0sarge1_i386.deb
| E: Sub-process /usr/bin/dpkg returned an error code (1)
| euclid:~# dpkg-deb: subprocess paste killed by signal (Broken pipe)
| So, what can I do now to rescue this?

That is a packaging bug between Christian and myself that we need to sort
out.  Thanks for pointing it out.

Amend the command above to also 'force overwriting of conflicting files', ie
tell dpkg and apt that you know better (which you do) and to just proceed:

	$ dpkg --install --force-overwrite /tmp/r-recommended_2.2.1*deb

should do the trick, and it should be smooth sailing on your preferred
'Debian stable plus current R' setup afterwards.

Let us know how it goes.


Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison

More information about the R-SIG-Debian mailing list