Running a current, standard debian stable, I added
deb http://cran.R-project.org/bin/linux/debian stable/
to /apt/sources.list to get the current backport stable distro.
When I installed r-base, apt-get wanted to remove all my previous
r-cran-* packages
and I let it, but encountered conflicts with things in r-recommended
that I've been
unable to resolve. It first showed up as (complete transcript below):
dpkg: r-cran-foreign: dependency problems, but removing anyway as you
request:
r-recommended depends on r-cran-foreign (>= 0.7-2).
Removing r-cran-foreign ...
----- transcript ------
euclid: ~ # su - root
euclid:~# apt-get install r-base
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
r-base-core r-recommended
Suggested packages:
r-doc-info r-mathlib
Recommended packages:
r-base-html r-base-dev
The following packages will be REMOVED:
r-cran-boot r-cran-cluster r-cran-design r-cran-effects r-cran-foreign
r-cran-hmisc r-cran-kernsmooth r-cran-lattice r-cran-mgcv r-cran-nlme
r-cran-rcmdr r-cran-rpart r-cran-survival r-cran-vr
The following packages will be upgraded:
r-base r-base-core r-recommended
3 upgraded, 0 newly installed, 14 to remove and 37 not upgraded.
Need to get 14.0MB of archives.
After unpacking 4391kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://cran.R-project.org stable/ r-base 2.2.1-0sarge1 [21.3kB]
Get:2 http://cran.R-project.org stable/ r-recommended 2.2.1-0sarge1 [6143kB]
Get:3 http://cran.R-project.org stable/ r-base-core 2.2.1-0sarge1 [7854kB]
Fetched 14.0MB in 56s (247kB/s)
(Reading database ... 129141 files and directories currently installed.)
Removing r-cran-rcmdr ...
Removing r-cran-design ...
Removing r-cran-hmisc ...
Removing r-cran-effects ...
dpkg: r-cran-foreign: dependency problems, but removing anyway as you
request:
r-recommended depends on r-cran-foreign (>= 0.7-2).
Removing r-cran-foreign ...
dpkg: r-cran-kernsmooth: dependency problems, but removing anyway as you
request:
r-recommended depends on r-cran-kernsmooth (>= 2.2.14); however:
Package r-cran-kernsmooth is to be removed.
Removing r-cran-kernsmooth ...
dpkg: r-cran-mgcv: dependency problems, but removing anyway as you request:
r-recommended depends on r-cran-mgcv (>= 1.1.5); however:
Package r-cran-mgcv is to be removed.
Removing r-cran-mgcv ...
dpkg: r-cran-vr: dependency problems, but removing anyway as you request:
r-cran-relimp depends on r-cran-vr.
r-recommended depends on r-cran-vr (>= 7.2.8); however:
Package r-cran-vr is to be removed.
Removing r-cran-vr ...
dpkg: r-cran-nlme: dependency problems, but removing anyway as you request:
r-recommended depends on r-cran-nlme (>= 3.1.52); however:
Package r-cran-nlme is to be removed.
Removing r-cran-nlme ...
dpkg: r-cran-lattice: dependency problems, but removing anyway as you
request:
r-recommended depends on r-cran-lattice (>= 0.10.11); however:
Package r-cran-lattice is to be removed.
Removing r-cran-lattice ...
dpkg: r-cran-rpart: dependency problems, but removing anyway as you request:
r-recommended depends on r-cran-rpart (>= 3.1.20); however:
Package r-cran-rpart is to be removed.
Removing r-cran-rpart ...
dpkg: r-cran-survival: dependency problems, but removing anyway as you
request:
r-recommended depends on r-cran-survival (>= 2.13.2-1); however:
Package r-cran-survival is to be removed.
r-cran-boot depends on r-cran-survival.
Removing r-cran-survival ...
dpkg: r-cran-boot: dependency problems, but removing anyway as you request:
r-recommended depends on r-cran-boot (>= 1.2.19).
Removing r-cran-boot ...
(Reading database ... 125008 files and directories currently installed.)
Preparing to replace r-base 2.1.0-1 (using
.../r-base_2.2.1-0sarge1_all.deb) ...Unpacking replacement r-base ...
dpkg: r-cran-cluster: dependency problems, but removing anyway as you
request:
r-recommended depends on r-cran-cluster (>= 1.9.6-2); however:
Package r-cran-cluster is to be removed.
(Reading database ... 125008 files and directories currently installed.)
Removing r-cran-cluster ...
(Reading database ... 124781 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/R/grid', which is also in
package r-base-core
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Preparing to replace r-base-core 2.1.0-1 (using
.../r-base-core_2.2.1-0sarge1_i386.deb) ...
Unpacking replacement r-base-core ...
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)
My next step wass to try aapt-get install -f, but this bombed too...
euclid:~# apt-get install -f
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
dpkg-deb: subprocess paste killed by signal (Broken pipe)
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)
Finally, I tried to reinstall some of the r-cran packages:
euclid:~# apt-get install r-cran-boot r-cran-cluster r-cran-design
r-cran-effects r-cran-foreign
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:
r-base: Depends: r-recommended (= 2.2.1-0sarge1) but 2.1.0-1 is to be
installed
r-cran-boot: Depends: r-cran-survival
r-cran-design: Depends: r-cran-hmisc but it is not going to be installed
Depends: r-cran-survival
r-cran-effects: Depends: r-cran-lattice (>= 0.10.11)
r-cran-relimp: Depends: r-cran-vr
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).
At this point, I'm stumped. How do I get everything back working again?
Michael Friendly Email: friendly at yorku.ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT M3J 1P3 CANADA
Michael,
Let's start the other way around: what do you want to achieve? What do you
want to avoid?
The basic premise is that
i) Debian stable at CRAN has only the base R package (ie all packages derived
from the source r-base, ie r-base-core, r-base-dev, r-doc-*, r-mathlib...)
as well as the r-recommended set (ie r-cran-vr with MASS, nnet, ...,
r-cran-boot, r-cran-lattice, ...) but strictly *no other* r-cran-*
packages (beyond what r-recommended provides) --- so no r-cran-rcmdr,
r-cran-car, ...
ii) Debian stable at Debian has a fair number of R and CRAN packages -- but
they are frozen in time at last spring when Debian stable was released.
That is a feature.
iii) Debian testing has a large number (~ 60) of R packages that are current,
tested and working. However, testing != stable and you indicated the last
time around that your sysadmin persuaded you to go with stable.
You seem to desire the choice of testing, as well as the fact that these are
current packages rather than old ones, delived via the stable archive. This
does not exist. You could however recruit a few students to run the
backport of the missing packages .... or you could just use
install.packages() with suitable arguments
If you pick Debian stable (a fine choice, in particular for a server or a
machine that is not meant to change) you must realize that you are giving up
current packages by your choice.
Personally, I like testing for my workstation as a best of both worlds
compromise. Your mileage may vary.
I may have misunderstood what you're after. Apologies if that is the case.
Hope this helps, Dirk
Hell, there are no rules here - we're trying to accomplish something.
-- Thomas A. Edison
Michael,
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.
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.
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).
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?
-Michael
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT M3J 1P3 CANADA
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
numbers.
| 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.
Dirk
Hell, there are no rules here - we're trying to accomplish something.
-- Thomas A. Edison