Discussion:
[R-sig-Debian] Xenial rpart package on CRAN built with wrong R version?
Ulrich KELLER
2018-08-14 08:04:40 UTC
Permalink
Hello,
library(rpart)
Error: package or namespace load failed for ‘rpart’:
package ‘rpart’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
installed.packages()['rpart',]
Package
"rpart"
LibPath
"/usr/lib/R/library"
Version
"4.1-13"
Priority
"recommended"
Depends
"R (>= 2.15.0), graphics, stats, grDevices"
Imports
NA
LinkingTo
NA
Suggests
"survival"
Enhances
NA
License
"GPL-2 | GPL-3"
License_is_FOSS
NA
License_restricts_use
NA
OS_type
NA
MD5sum
NA
NeedsCompilation
"yes"
Built
“3.4.3"

Package r-cran-rpart was updated though, as "apt-cache show r-cran-rpart" lists the package file as "xenial-cran35/r-cran-rpart_4.1-13-1cran1xenial0_amd64.deb". No other version of rpart is installed. It seems that this Ubuntu Xenial package has to be updated with a version of rpart what was built with R 3.5 (instead of 3.4.3).

Thank you for the otherwise great work and kind regards,

Uli Keller



[[alternative HTML version deleted]]
George N. White III
2018-08-14 10:25:09 UTC
Permalink
Post by Ulrich KELLER
Hello,
I just upgraded my Ubuntu Xenial system to R 3.5.1 (from 3.4.?) by
changing the sources.list entry and doing an "apt-get dist-upgrade".
What sources.list entry did you use?
Post by Ulrich KELLER
library(rpart)
package ‘rpart’ was installed by an R version with different internals;
it needs to be reinstalled for use with this R version
[...]
Package r-cran-rpart was updated though, as "apt-cache show r-cran-rpart"
lists the package file as
"xenial-cran35/r-cran-rpart_4.1-13-1cran1xenial0_amd64.deb". No other
version of rpart is installed. It seems that this Ubuntu Xenial package has
to be updated with a version of rpart what was built with R 3.5 (instead of
3.4.3).
I have a working rpart:

Filename: pool/main/r/rpart/r-cran-rpart_4.1-13-3cran1ppa0xenial0_amd64.deb
--
George N. White III

[[alternative HTML version deleted]]
Ulrich KELLER
2018-08-14 10:42:20 UTC
Permalink
I’m not using the PPA, but the CRAN mirror from https://cran.r-project.org/bin/linux/ubuntu/#installation:

deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/

On 14 Aug 2018, at 12:25, George N. White III <***@gmail.com<mailto:***@gmail.com>> wrote:

qOn Tue, 14 Aug 2018 at 05:04, Ulrich KELLER <***@uni.lu<mailto:***@uni.lu>> wrote:
Hello,

I just upgraded my Ubuntu Xenial system to R 3.5.1 (from 3.4.?) by changing the sources.list entry and doing an "apt-get dist-upgrade". Everything works except loading the rpart package in R:

What sources.list entry did you use?
library(rpart)
Error: package or namespace load failed for ‘rpart’:
package ‘rpart’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
[...]
Package r-cran-rpart was updated though, as "apt-cache show r-cran-rpart" lists the package file as "xenial-cran35/r-cran-rpart_4.1-13-1cran1xenial0_amd64.deb". No other version of rpart is installed. It seems that this Ubuntu Xenial package has to be updated with a version of rpart what was built with R 3.5 (instead of 3.4.3).

I have a working rpart:

Filename: pool/main/r/rpart/r-cran-rpart_4.1-13-3cran1ppa0xenial0_amd64.deb
--
George N. White III



[[alternative HTML version deleted]]
Michael Rutter
2018-08-14 22:38:25 UTC
Permalink
Post by Ulrich KELLER
deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/
Hello,
Not quite sure if this has been resolved. I can confirm that the Xenial
rpart packages on the RRutter3.5 PPA is indeed built against R 3.5. The
rpart packages on CRAN is the same as on the PPA, so I believe this is
an isolated incident.

Sometime the dist-upgrade leaves a few breadcrumbs that need to be
cleaned up. If all else fails, remove the installed rpart package,
download the correct binary from CRAN or the PPA, and install with dpkg.

Hope this helps,
Michael
Ulrich KELLER
2018-08-16 05:35:10 UTC
Permalink
I manually downloaded the rpart package and installed it using dpkg, without removing the old rpart package first, and now everything works. During the installation, dpkg said:

Unpacking r-cran-rpart (4.1-13-1cran1xenial0) over (4.1-13-1cran1xenial0)

So again, it seemed that the new version had been installed, but it really wasn’t. I had no idea that something like this could happen. Huh.

Anyway, thank you very much for your help!


On 15 Aug 2018, at 00:38, Michael Rutter <***@gmail.com<mailto:***@gmail.com>> wrote:



On 08/14/2018 06:42 AM, Ulrich KELLER wrote:
I’m not using the PPA, but the CRAN mirror from https://cran.r-project.org/bin/linux/ubuntu/#installation:
deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/
On 14 Aug 2018, at 12:25, George N. White III <***@gmail.com<mailto:***@gmail.com><mailto:***@gmail.com>> wrote:
qOn Tue, 14 Aug 2018 at 05:04, Ulrich KELLER <***@uni.lu<mailto:***@uni.lu><mailto:***@uni.lu>> wrote:
Hello,
I just upgraded my Ubuntu Xenial system to R 3.5.1 (from 3.4.?) by changing the sources.list entry and doing an "apt-get dist-upgrade". Everything works except loading the rpart package in R:

Not quite sure if this has been resolved. I can confirm that the Xenial rpart packages on the RRutter3.5 PPA is indeed built against R 3.5. The rpart packages on CRAN is the same as on the PPA, so I believe this is an isolated incident.

Sometime the dist-upgrade leaves a few breadcrumbs that need to be cleaned up. If all else fails, remove the installed rpart package, download the correct binary from CRAN or the PPA, and install with dpkg.

Hope this helps,
Michael

_______________________________________________
R-SIG-Debian mailing list
R-SIG-***@r-project.org<mailto:R-SIG-***@r-project.org>
https://stat.ethz.ch/mailman/listinfo/r-sig-debian


[[alternative HTML version deleted]]
Ulrich KELLER
2018-08-16 06:15:09 UTC
Permalink
The old (3.4) repo has the same version or rpart (with the same package filename), which I assume was the version installed on my machine prior to my upgrade to 3.5. I guess apt didn’t upgrade because there was no version change. Maybe the debian_revision part of the version could be bumped to make sure the rebuilt packages are upgraded for people upgrading from the 3.4 repo?
Post by Ulrich KELLER
Unpacking r-cran-rpart (4.1-13-1cran1xenial0) over (4.1-13-1cran1xenial0)
So again, it seemed that the new version had been installed, but it really wasn’t. I had no idea that something like this could happen. Huh.
Anyway, thank you very much for your help!
deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/
Hello,
Not quite sure if this has been resolved. I can confirm that the Xenial rpart packages on the RRutter3.5 PPA is indeed built against R 3.5. The rpart packages on CRAN is the same as on the PPA, so I believe this is an isolated incident.
Sometime the dist-upgrade leaves a few breadcrumbs that need to be cleaned up. If all else fails, remove the installed rpart package, download the correct binary from CRAN or the PPA, and install with dpkg.
Hope this helps,
Michael
_______________________________________________
R-SIG-Debian mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[[alternative HTML version deleted]]
_______________________________________________
R-SIG-Debian mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-debian
George N. White III
2018-08-16 11:21:23 UTC
Permalink
Post by Ulrich KELLER
The old (3.4) repo has the same version or rpart (with the same package
filename), which I assume was the version installed on my machine prior to
my upgrade to 3.5. I guess apt didn’t upgrade because there was no version
change. Maybe the debian_revision part of the version could be bumped to
make sure the rebuilt packages are upgraded for people upgrading from the
3.4 repo?
The package system really should ensure that older packages get replaced
when there
are rebuilt versions.

I do recall seeing instructions to remove all the currently installed
r-cran packages
before installing 3.5. This is problematic -- some R users don't have
reliable internet
access so have to be very careful that all packages they use are installed
when they
have network access (think of people doing field work in remote areas or on
ships at sea).
Post by Ulrich KELLER
Post by Ulrich KELLER
I manually downloaded the rpart package and installed it using dpkg,
without removing the old rpart package first, and now everything works.
Post by Ulrich KELLER
Unpacking r-cran-rpart (4.1-13-1cran1xenial0) over (4.1-13-1cran1xenial0)
So again, it seemed that the new version had been installed, but it
really wasn’t. I had no idea that something like this could happen. Huh.
Post by Ulrich KELLER
Anyway, thank you very much for your help!
I’m not using the PPA, but the CRAN mirror from
deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/
Hello,
I just upgraded my Ubuntu Xenial system to R 3.5.1 (from 3.4.?) by
changing the sources.list entry and doing an "apt-get dist-upgrade".
Post by Ulrich KELLER
Not quite sure if this has been resolved. I can confirm that the Xenial
rpart packages on the RRutter3.5 PPA is indeed built against R 3.5. The
rpart packages on CRAN is the same as on the PPA, so I believe this is an
isolated incident.
Post by Ulrich KELLER
Sometime the dist-upgrade leaves a few breadcrumbs that need to be
cleaned up. If all else fails, remove the installed rpart package,
download the correct binary from CRAN or the PPA, and install with dpkg.
Post by Ulrich KELLER
Hope this helps,
Michael
_______________________________________________
R-SIG-Debian mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[[alternative HTML version deleted]]
_______________________________________________
R-SIG-Debian mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-debian
_______________________________________________
R-SIG-Debian mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-debian
--
George N. White III

[[alternative HTML version deleted]]
Dirk Eddelbuettel
2018-08-16 11:55:53 UTC
Permalink
On 16 August 2018 at 08:21, George N. White III wrote:
| The package system really should ensure that older packages get replaced
| when there are rebuilt versions.

You can continue to sleep soundly at night because _it does_.

But sometime we introduce a minor infelicity as we rename the files in a by
hand / by script manner. We are aware of this and am trying to do this as
robustly as possible but sometimes this fails.

As Michael pointed out, you can a) generally debug the behaviour and b)
override it.

Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Loading...