0

I installed R 4.0.4 from source on Raspberry Pi 400, which uses ARM processessors. This seemed fine.

However, when I tried to upgrade installed packages I ran into a few problems.

My question is: After installing R 4.0.4 but before upgrading packages, what steps should I take to insure the package upgrade will be successful?

This is what I did do; which did not succeed:

First, I ran packageStatus to see ~29 packages needed an upgrade.

x  <- packageStatus()
print(x)

Then a did the upgrade which reported ~ 31 warnings (packages that had non-zero exit status). About 1 or 2 packages did upgrade successfully.

upgrade(x, ask=FALSE)
update(x)

However, I also noted errors during the upgrade such as:

  • Wrong ELF class ELFCLASS64.
  • lazy loading failed for package: "DT"

Thanks.

jim rothstein
  • 145
  • 2
  • 9
  • 1
    Currently R-4.0.4 is still rather new. So several packages may have updated and cause dependencies to crash. Maybe this is the cause of your problem? It is not an uncommon strategy to wait a time to reduce the risk of package upgrade crashing automated setups. – Oliver Feb 17 '21 at 17:43
  • Outside of this, you could use the `renv` package to create a static image of your packages and a new image for upgrading. That way you can always "regret" your upgrade at minimum cost by switching image. – Oliver Feb 17 '21 at 17:45
  • 1
    What previous version were the packages installed using? In general packages are not compatible between major version changes. Packages would need to be reinstalled when doing from <4 to 4. Normally R creates library paths which include the major/minor version number so you can't easily use the incorrect versions. Just copying over old packages to the new version of R is generally a very bad idea. – MrFlick Feb 17 '21 at 19:47
  • I was upgrading from R-4.0.3 to R-4.0.4 but on RaspberryPi 400. One upgrade solution is to study install.packages() error msgs carefully, using verbose=TRUE. Then either adding missing Debian package or installing certain R package. Then repeat. Tedious but works. – jim rothstein Feb 19 '21 at 20:51

1 Answers1

0

This process worked, tedious, but worked.

Upgrading packages from R-4.0.3 to R-4.0.4 on Raspberry Pi 400.

  • study install.packages() error msgs carefully, using verbose=TRUE.
  • Then either add missing Debian package or install certain R package.
  • Then repeat. Tedious but works.
jim rothstein
  • 145
  • 2
  • 9