The glmmTMB package depends on several upstream packages, which it
uses in a way that depends heavily on their internal (binary) structure.
Sometimes, therefore, installing an update to one of these packages will
require that you re-install a binary-compatible version of glmmTMB,
i.e. a version that has been compiled with the updated version of the upstream
package.
If you have development tools (compilers etc.) installed, you
should be able to re-install a binary-compatible version of the package by running
install.packages("glmmTMB", type="source"). If you want to install
the development version of glmmTMB instead, you can use
remotes::install_github("glmmTMB/glmmTMB/glmmTMB").
(On Windows, you can install development tools following the instructions at
https://cran.r-project.org/bin/windows/Rtools/; on MacOS, see
https://mac.r-project.org/tools/.)
If you do not have development tools and can't/don't want to install them (and so can't install packages with compiled code from source), you have two choices:
revert the upstream package(s) to their previous binary version. For example, using the
checkpoint package:
## load (installing if necessary) the checkpoint package
while (!require("checkpoint")) install.packages("checkpoint")
## retrieve build date of installed version of glmmTMB
bd <- as.character(asDateBuilt(
      packageDescription("glmmTMB",fields="Built")))
oldrepo <- getOption("repos")
use_mran_snapshot(bd) ## was setSnapshot() pre-checkpoint v1.0.0
install.packages("TMB")
options(repos=oldrepo) ## restore original repoA similar recipe (substituting Matrix for TMB and TMB for glmmTMB)
can be used if you get warnings about an incompatibility between TMB and Matrix.
hope that the glmmTMB maintainers have posted a binary
version of the package that works with your system; try installing it via
install.packages("glmmTMB",repos="https://glmmTMB.github.io/glmmTMB/repos",type="binary")
If this doesn't work, please file an issue (with full details about your
operating system and R version) asking the maintainers to build and
post an appropriate binary version of the package.