Re: [R-pkg-devel] Problem with loading package "devtools" from CRAN.
G'day Rolf, On Tue, 30 Apr 2024 01:21:15 + Rolf Turner wrote: > Previously I got an error message from > > install.packages("devtools",lib="/home/rolf/Rlib") > > but now of course I cannot reproduce it. Presumably the install.packages() invocation did not produce an error message but a subsequent "library(devtools)" did? I am not sure how remotes::install_github() behaves. Are you using R directly or via RStudio? RStudio redefines the behaviour of install.packages() so I am not sure what would happen if you type that command into an R session running in RStudio. As far as I remember, R's install.packages(), as you would invoke it if you used R directly, installs the requested packages and any of its (Depends/Imports) dependencies if these dependencies do not exist in your libraries. As devtool's dependencies must have existed on your system, your command only re-installed devtools but none of the dependencies. And it must be one of the dependencies that uses compiled code and created the problem, as a "packageDescription("devtools")" actually shows "NeedsCompilation: no". You should really execute an update.packages(lib="/home/rolf/Rlib", checkBuilt=TRUE) whenever you upgrade your R version, definitely when the upgrade involves changing the major/minor version. Cheers, Berwin __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Problem with loading package "devtools" from CRAN.
On 30 April 2024 at 01:21, Rolf Turner wrote: | On Mon, 29 Apr 2024 06:30:20 -0500 | Dirk Eddelbuettel wrote: | | | | > These days, I strongly recommend r2u [1]. As you already use R via | > CRAN through apt, r2u adds one more repository after which _all_ R | > packages are handled via the same apt operations that you already | > trust to get you R from CRAN (as well as anything else on your | > machine). This covers all 20+ thousand CRAN packages along with 400 | > key BioC packages. Handling your packages with your system package | > managed guarantees all dependencies are resolved reliably and | > quickly. It makes installing, upgrading, managing CRAN package | > easier, faster and more reliable. | | | | > [1] https://eddelbuettel.github.io/r2u | | | | Sounds promising, but I cannot follow what "r2u" is actually | all about. What *is* r2u? And how do I go about using it? Do I | invoke it (or invoke something) from within R? Or do I invoke | something from the OS? E.g. something like | | sudo apt-get install | | ??? You could peruse the documentation at https://eddelbuettel.github.io/r2u and / or the blogposts I have especially below https://dirk.eddelbuettel.com/blog/code/r4/ (and you may have to read 'in reverse order'). | I have downloaded the file add_cranapt_jammy.sh and executed | |sudo sh add_cranapt_jammy.sh | | which seemed to run OK. What now? Briefly, when you setup r2u you set up new a new apt repo AND a new way to access them from R (using the lovely `bspm` package). So in R saying `install.packages("devtools")` will seamlessly fetch r-cran-devtools and about 100 other files it depends upon (if you start from an 'empty' system as I did in a container last eve before replying to you). That works in mere seconds. You can then say `library(devtools)` as if you compiled locally. Naturally, using binaries both way faster and easier when it works (as this generally does). See the blog posts, see the demos, see the r2u site, try in (risklessly !!) in a container or at gitpod or in continuous integration or in codespaces or ... The docs try to get to that. Maybe start small and aim `install.packages()` at a package you know you do not have see what what happens? Follow-ups may be more appropriate for r-sig-debian, and/or an issue ticket at the r2u github repo depending on nature of the follow-up. Good luck, Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Problem with loading package "devtools" from CRAN.
Well, I just uninstalled the devtools that I had installed from github and ran install.packages("devtools",lib="/home/rolf/Rlib") No error message this time; the install went just fine. The explanation may lie in the plethora of packages that I re-installed when I invoked remotes::install_github("r-lib/devtools",lib="/home/rolf/Rlib") This probably relates to Simon Urbanek's advice to re-install all packages in my local library. Which I will make sure to do in future. Previously I got an error message from install.packages("devtools",lib="/home/rolf/Rlib") but now of course I cannot reproduce it. On Mon, 29 Apr 2024 06:30:20 -0500 Dirk Eddelbuettel wrote: > These days, I strongly recommend r2u [1]. As you already use R via > CRAN through apt, r2u adds one more repository after which _all_ R > packages are handled via the same apt operations that you already > trust to get you R from CRAN (as well as anything else on your > machine). This covers all 20+ thousand CRAN packages along with 400 > key BioC packages. Handling your packages with your system package > managed guarantees all dependencies are resolved reliably and > quickly. It makes installing, upgrading, managing CRAN package > easier, faster and more reliable. > [1] https://eddelbuettel.github.io/r2u Sounds promising, but I cannot follow what "r2u" is actually all about. What *is* r2u? And how do I go about using it? Do I invoke it (or invoke something) from within R? Or do I invoke something from the OS? E.g. something like sudo apt-get install ??? I have downloaded the file add_cranapt_jammy.sh and executed sudo sh add_cranapt_jammy.sh which seemed to run OK. What now? cheers, Rolf -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Problem with loading package "devtools" from CRAN.
Rolf, This question might have been more appropriate for r-sig-debian than here. But as Simon noted, the lack of detail makes is difficult to say anything to aid. It likely was an issue local to your setup and use. These days, I strongly recommend r2u [1]. As you already use R via CRAN through apt, r2u adds one more repository after which _all_ R packages are handled via the same apt operations that you already trust to get you R from CRAN (as well as anything else on your machine). This covers all 20+ thousand CRAN packages along with 400 key BioC packages. Handling your packages with your system package managed guarantees all dependencies are resolved reliably and quickly. It makes installing, upgrading, managing CRAN package easier, faster and more reliable. To double-check, I just spot-checked 'devtools' on an r2u container (on top of Ubuntu 22.04) and of course devtools install and runs fine (as a binary). So maybe give r2u a go. "Sixteen million packages served" in two years ... Cheers, Dirk [1] https://eddelbuettel.github.io/r2u -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Problem with loading package "devtools" from CRAN.
I also had the problem that devtools didn't install. I used update.packages(ask =FALSE) and that solved the problem. Before that I tried to locate the culprit but it was not one of the direct dependencies of devtools. Georgi Boshnakov Sent from Outlook for Android<https://aka.ms/AAb9ysg> From: R-package-devel on behalf of Simon Urbanek Sent: Monday, April 29, 2024 7:33:55 AM To: Rolf Turner Cc: je...@posit.co ; r-package-devel@r-project.org Subject: Re: [R-pkg-devel] Problem with loading package "devtools" from CRAN. Rolf, what do you mean by "broken"? Since you failed to include any proof nor details it's unlikely that anyone can help you, but chances are pretty high that it was a problem on your end. I just checked with R 4.4.0 on Ubuntu 22.04 and devtools install and load just fine, so it is certainly broken on CRAN. Make sure you don't have packages for old R version in your local libraries - that is a most common mistake - always remove them when upgrading R and re-install if still need them. You can check the locations of your libraries with .libPaths() in R. Sometimes, update.packages(checkBuilt=TRUE) can do the trick as well, but I prefer clean re-installs for safety as it also helps you clean up old cruft that is not longer needed. Cheers, Simon > On Apr 29, 2024, at 1:19 PM, Rolf Turner 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. > > This morning my software up-dater (Ubuntu 22.04.4) prompted me to > install updated versions of some software, including r-base. I thereby > obtained what I believe is the latest version of R (4.4.0 (2024-04-24)). > > Then I could not load the "devtools" package, which is fairly crucial to > my work. > > A bit of web-searching got me to a post on github by Henrik Bengtsson, > which referred to the devtools problem. I therefore decided to try > installing devtools from github: > >remotes::install_github("r-lib/devtools",lib="/home/rolf/Rlib") > > Some 50-odd packages seemed to require up-dating. I went for it, and > after a fairly long wait, while messages about the updating flowed by, > devtools seemed to get installed. Now "library(devtools)" runs without > error, so I am happy with my own situation. However there seems to be > a problem with the devtools package on CRAN, which ought to be fixed. > > cheers, > > Rolf Turner > > -- > Honorary Research Fellow > Department of Statistics > University of Auckland > Stats. Dep't. (secretaries) phone: > +64-9-373-7599 ext. 89622 > Home phone: +64-9-480-4619 > > __ > R-package-devel@r-project.org mailing list > https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!PDiH4ENfjr2_Jw!D1bv6hCvIc_G_5ay6dqpVMj1roESgfSV8NT0AaMD8kJ92-7-YAkFg6c4TaVx-GXHEj7yieujSDu7LATDgtP-aSPQ7C2b745lri9DbFpH$ > [stat[.]ethz[.]ch] > __ R-package-devel@r-project.org mailing list https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!PDiH4ENfjr2_Jw!D1bv6hCvIc_G_5ay6dqpVMj1roESgfSV8NT0AaMD8kJ92-7-YAkFg6c4TaVx-GXHEj7yieujSDu7LATDgtP-aSPQ7C2b745lri9DbFpH$ [stat[.]ethz[.]ch] [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Problem with loading package "devtools" from CRAN.
Rolf, what do you mean by "broken"? Since you failed to include any proof nor details it's unlikely that anyone can help you, but chances are pretty high that it was a problem on your end. I just checked with R 4.4.0 on Ubuntu 22.04 and devtools install and load just fine, so it is certainly broken on CRAN. Make sure you don't have packages for old R version in your local libraries - that is a most common mistake - always remove them when upgrading R and re-install if still need them. You can check the locations of your libraries with .libPaths() in R. Sometimes, update.packages(checkBuilt=TRUE) can do the trick as well, but I prefer clean re-installs for safety as it also helps you clean up old cruft that is not longer needed. Cheers, Simon > On Apr 29, 2024, at 1:19 PM, Rolf Turner 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. > > This morning my software up-dater (Ubuntu 22.04.4) prompted me to > install updated versions of some software, including r-base. I thereby > obtained what I believe is the latest version of R (4.4.0 (2024-04-24)). > > Then I could not load the "devtools" package, which is fairly crucial to > my work. > > A bit of web-searching got me to a post on github by Henrik Bengtsson, > which referred to the devtools problem. I therefore decided to try > installing devtools from github: > >remotes::install_github("r-lib/devtools",lib="/home/rolf/Rlib") > > Some 50-odd packages seemed to require up-dating. I went for it, and > after a fairly long wait, while messages about the updating flowed by, > devtools seemed to get installed. Now "library(devtools)" runs without > error, so I am happy with my own situation. However there seems to be > a problem with the devtools package on CRAN, which ought to be fixed. > > cheers, > > Rolf Turner > > -- > Honorary Research Fellow > Department of Statistics > University of Auckland > Stats. Dep't. (secretaries) phone: > +64-9-373-7599 ext. 89622 > Home phone: +64-9-480-4619 > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Problem with loading package "devtools" from CRAN.
G'day Rolf, hope all is well. On Mon, 29 Apr 2024 01:19:50 + Rolf Turner 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 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Problem with loading package "devtools" from CRAN.
Executive summary: > The devtools package on CRAN appears to be broken. > Installing devtools from github (using remotes::install_github()) > seems to give satisfactory results. This morning my software up-dater (Ubuntu 22.04.4) prompted me to install updated versions of some software, including r-base. I thereby obtained what I believe is the latest version of R (4.4.0 (2024-04-24)). Then I could not load the "devtools" package, which is fairly crucial to my work. A bit of web-searching got me to a post on github by Henrik Bengtsson, which referred to the devtools problem. I therefore decided to try installing devtools from github: remotes::install_github("r-lib/devtools",lib="/home/rolf/Rlib") Some 50-odd packages seemed to require up-dating. I went for it, and after a fairly long wait, while messages about the updating flowed by, devtools seemed to get installed. Now "library(devtools)" runs without error, so I am happy with my own situation. However there seems to be a problem with the devtools package on CRAN, which ought to be fixed. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel