! LaTeX Error: File `bookmark.sty' not found while building bookdown-demo

Error when I tried to build (Build Book) the bookdown-demo. Here's the error message:

! LaTeX Error: File `bookmark.sty' not found.

! Emergency stop.
<read *>

Error: LaTeX failed to compile bookdown-demo.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips. See bookdown-demo.log for more info.
Execution halted
Error: bookdown::render_book() failed to render the output format 'bookdown::pdf_book'.: Error: LaTeX failed to compile bookdown-demo.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips. See bookdown-demo.log for more info.
Execution halted

Exited with status 1.

sessionInfo()
R version 4.4.2 (2024-10-31)
Platform: x86_64-apple-darwin20
Running under: macOS Ventura 13.7.1

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] bookdown_0.41

loaded via a namespace (and not attached):
[1] compiler_4.4.2 fastmap_1.2.0 cli_3.6.3 htmltools_0.5.8.1 tools_4.4.2 rstudioapi_0.17.1
[7] yaml_2.3.10 tinytex_0.54 rmarkdown_2.29 knitr_1.49 xfun_0.49 digest_0.6.37
[13] rlang_1.1.4 evaluate_1.0.1

Help is greatly appreciated.

After digging a bit into the build book, the error occurred only for building pdf; it worked fine for gitbook and epub.

What version of LaTeX do you have installed?

only for the pdf output you will need the bookmark.sty file otherwise it is not necessary. Your latex compiler can't find the file (probably because you are missing the package needing this file) and throws the error.

According to A.3 LaTeX | bookdown: Authoring Books and Technical Documents with R Markdown tinytex should be installed and contain the proper sty files.

See also please "bookdown.sty not found" error when trying to make pdf · Issue #247 · rstudio/bookdown · GitHub which addresses the same issue.

As @ vedoa says you are missing the package. hence my original quesion.

Unless you have storage problems I'd suggest a full latex installation rather than than tinytex.