Hi, I’am currently trying to learn how to preprocess LC-MS data with MetaboAnalyst R package, following the tutorial and it’s first step requires OptiLCMS package installation.
I tried every method provided on webpage https://github.com/xia-lab/OptiLCMS, but every time got the same error output:
Downloading GitHub repo xia-lab/OptiLCMS@HEAD
pdflatex not found! Not building PDF manual.
── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/hl/hx1py9nn64g7mc3zzjs2bhjw0000gn/T/RtmpiCqhRI/remotesa2a1e2ccfad/xia-lab-OptiLCMS-99c5cb5/DESCRIPTION’ ...
─ preparing ‘OptiLCMS’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ installing the package to build vignettes
-----------------------------------
─ installing *source* package ‘OptiLCMS’ ...
** this is package ‘OptiLCMS’ version ‘1.2.0’
** using staged installation
** libs
using C compiler: ‘Apple clang version 17.0.0 (clang-1700.0.13.5)’
using Fortran compiler: ‘GNU Fortran (GCC) 14.2.0’
using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.0.13.5)’
using C++14
using SDK: ‘’
clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -fstrict-aliasing -fPIC -falign-functions=64 -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c massifquant/xcms_massifquant.cpp -o massifquant/xcms_massifquant.o
In file included from massifquant/xcms_massifquant.cpp:17:
In file included from massifquant/SegProc.h:4:
massifquant/nmath.h:74:10: fatal error: 'libintl.h' file not found
74 | #include <libintl.h>
| ^~~~~~~~~~~
1 error generated.
make: *** [massifquant/xcms_massifquant.o] Error 1
ERROR: compilation failed for package ‘OptiLCMS’
─ removing ‘/private/var/folders/hl/hx1py9nn64g7mc3zzjs2bhjw0000gn/T/RtmpgH7rPU/Rinst1578650f7807/OptiLCMS’
-----------------------------------
ERROR: package installation failed
Error: Failed to install 'OptiLCMS' from GitHub:
! System command 'R' failed
I’ve tried google out the “libintl.h missing file” problem but it seems I have it since in terminal
locate libintl.h
gives
/opt/homebrew/Cellar/gettext/0.26/include/libintl.h
/opt/homebrew/include/libintl.h
so now I have zero ideas how to fix this problem.
For some additional information, I’am using R version 4.5.1 on MacOS Sequoia 15.6 and I have the lates version of Xcode and GNU Fortran
session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────
setting value
version R version 4.5.1 (2025-06-13)
os macOS Sequoia 15.6
system aarch64, darwin20
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
date 2025-08-22
rstudio 2025.05.1+513 Mariposa Orchid (desktop)
pandoc NA
quarto 1.6.42 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto
─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
BiocManager * 1.30.26 2025-06-05 [1] CRAN (R 4.5.0)
cachem 1.1.0 2024-05-16 [1] CRAN (R 4.5.0)
callr 3.7.6 2024-03-25 [1] CRAN (R 4.5.0)
cli 3.6.5 2025-04-23 [1] CRAN (R 4.5.0)
curl 7.0.0 2025-08-19 [1] CRAN (R 4.5.0)
desc 1.4.3 2023-12-10 [1] CRAN (R 4.5.0)
devtools * 2.4.5 2022-10-11 [1] CRAN (R 4.5.0)
digest 0.6.37 2024-08-19 [1] CRAN (R 4.5.0)
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.5.0)
fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.5.0)
fs 1.6.6 2025-04-12 [1] CRAN (R 4.5.0)
glue 1.8.0 2024-09-30 [1] CRAN (R 4.5.0)
htmltools 0.5.8.1 2024-04-04 [1] CRAN (R 4.5.0)
htmlwidgets 1.6.4 2023-12-06 [1] CRAN (R 4.5.0)
httpuv 1.6.16 2025-04-16 [1] CRAN (R 4.5.0)
later 1.4.3 2025-08-20 [1] CRAN (R 4.5.0)
lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.5.0)
magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.5.0)
memoise 2.0.1 2021-11-26 [1] CRAN (R 4.5.0)
mime 0.13 2025-03-17 [1] CRAN (R 4.5.0)
miniUI 0.1.2 2025-04-17 [1] CRAN (R 4.5.0)
pkgbuild 1.4.8 2025-05-26 [1] CRAN (R 4.5.0)
pkgload 1.4.0 2024-06-28 [1] CRAN (R 4.5.0)
processx 3.8.6 2025-02-21 [1] CRAN (R 4.5.0)
profvis 0.4.0 2024-09-20 [1] CRAN (R 4.5.0)
promises 1.3.3 2025-05-29 [1] CRAN (R 4.5.0)
ps 1.9.1 2025-04-12 [1] CRAN (R 4.5.0)
purrr 1.1.0 2025-07-10 [1] CRAN (R 4.5.0)
R6 2.6.1 2025-02-15 [1] CRAN (R 4.5.0)
Rcpp 1.1.0 2025-07-02 [1] CRAN (R 4.5.0)
remotes 2.5.0 2024-03-17 [1] CRAN (R 4.5.0)
rlang 1.1.6 2025-04-11 [1] CRAN (R 4.5.0)
rstudioapi 0.17.1 2024-10-22 [1] CRAN (R 4.5.0)
sessioninfo 1.2.3 2025-02-05 [1] CRAN (R 4.5.0)
shiny 1.11.1 2025-07-03 [1] CRAN (R 4.5.0)
urlchecker 1.0.1 2021-11-30 [1] CRAN (R 4.5.0)
usethis * 3.1.0 2024-11-26 [1] CRAN (R 4.5.0)
vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.5.0)
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.5.0)
[1] /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
* ── Packages attached to the search path.