[R-pkg-devel] Problem with loading package "devtools" from CRAN.

Berwin A Turlach berw|n@tur|@ch @end|ng |rom gm@||@com
Mon Apr 29 08:27:42 CEST 2024


G'day Rolf,

hope all is well.

On Mon, 29 Apr 2024 01:19:50 +0000
Rolf Turner <rolfturner using posteo.net> wrote:

> Executive summary:
> 
> > The devtools package on CRAN appears to be broken.
> > Installing devtools from github (using remotes::install_github())
> > seems to give satisfactory results.  

I somehow have not shared this experience.  But then I compile on my
machines (Ubuntu 22.04.4) R and packages from source.

For me the devtools package from CRAN seems to work fine with R 4.4.0

> [...] I thereby obtained what I believe is the latest version of R
> (4.4.0 (2024-04-24)).

Well, what happens if you start R and enter "R.version"?  That should
confirm whether you run R 4.4.0. :)

If you run R 4.4.0 but previously ran R 4.3.x then you are running now
a version with a new minor version number.  AFAIK, there is no
guarantee that at the interface level to compiled code R versions
remain compatible when the minor version number changes.

So on machines where I do not compile from source, I usually run
"update.packages(checkBuilt=TRUE)" whenever I upgrade R on those
machines, definitely if the upgrade involves a change in the major or
minor version number. 

Did you try updating your packages?

Well, you probably first want to find out where exactly the Debian R
distribution installs additional packages (Dirk might help there), and
it might be that you have to run either (or all) of:

update.packages(lib="/usr/local/lib/R/site-library", checkBuilt=TRUE)
update.packages(lib="/usr/lib/R/site-library", checkBuilt=TRUE)
update.packages(lib="/usr/lib/R/library", checkBuilt=TRUE)

though, by a short look at my Ubuntu machine, it may be that the last
two locations are not writeable for you as user, and the first one only
if you belong to the group "staff" as normal user on your machine.

> A bit of web-searching got me to a post on github by Henrik Bengtsson,
> which referred to the devtools problem. 

Could you provide a link?  I could not find anything relevant. :)

> However there seems to be a problem with the devtools package on
> CRAN, which ought to be fixed.

Or, perhaps, just that the interface to compiled code changed from R
3.6.x to R 4.4.0 and, hence, all packages that rely on compiled code
must be reinstalled.

Stay safe.

Cheers,

	Berwin



More information about the R-package-devel mailing list