Can not install MetaboAnalystR because of namespaceExport (MacOS15.5)

devtools::install_github(“xia-lab/MetaboAnalystR”, build = TRUE, build_vignettes = FALSE, force = TRUE)
Downloading GitHub repo xia-lab/MetaboAnalystR@HEAD
Skipping 9 packages not available: Biobase, pcaMethods, siggenes, MSnbase, impute, fgsea, edgeR, BiocParallel, RBGL
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────
:heavy_check_mark: checking for file ‘/private/var/folders/4z/jz6m7r2j40v1_9r4ly75z7mc0000gn/T/RtmpraiwgT/remotesbe6a30e6a581/xia-lab-MetaboAnalystR-c5c2e45/DESCRIPTION’ …
─ preparing ‘MetaboAnalystR’:
:heavy_check_mark: checking DESCRIPTION meta-information …
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts (462ms)
─ checking for empty or unneeded directories
NB: this package now depends on R (>= 4.1.0)
WARNING: Added dependency on R >= 4.1.0 because package code uses the
pipe |> or function shorthand (…) syntax added in R 4.1.0.
File(s) using such syntax:
‘multifac_asca_heatmap2.R’
─ building ‘MetaboAnalystR_4.0.0.tar.gz’

  • installing source package ‘MetaboAnalystR’ …
    ** this is package ‘MetaboAnalystR’ version ‘4.0.0’
    ** using staged installation
    ** libs
    using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.0.13.5)’
    using C++11
    using SDK: ‘MacOSX15.5.sdk’
    rm -f fortran/decorana.o c/Internal_utils_batch.o c/util.o c/fastmatch.o c/nncgc.o cpp/melt.o c/mzROI.o c/xcms_binners.o Exports.o
    /opt/gfortran/bin/gfortran -fPIC -Wall -g -O2 -c fortran/decorana.f -o fortran/decorana.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I’/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include’ -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/Internal_utils_batch.c -o c/Internal_utils_batch.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I’/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include’ -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/util.c -o c/util.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I’/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include’ -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/fastmatch.c -o c/fastmatch.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I’/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include’ -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/nncgc.c -o c/nncgc.o
    clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I’/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include’ -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c cpp/melt.cpp -o cpp/melt.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I’/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include’ -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/mzROI.c -o c/mzROI.o
    clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I’/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include’ -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/xcms_binners.c -o c/xcms_binners.o
    c/xcms_binners.c:11:1: warning: ‘/’ within block comment [-Wcomment]
    11 | /

    | ^
    c/xcms_binners.c:361:7: warning: unused variable ‘idx’ [-Wunused-variable]
    361 | int idx = 0;
    | ^~~
    2 warnings generated.
    clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I’/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include’ -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c Exports.cpp -o Exports.o
    clang++ -arch x86_64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o MetaboAnalystR.so fortran/decorana.o c/Internal_utils_batch.o c/util.o c/fastmatch.o c/nncgc.o cpp/melt.o c/mzROI.o c/xcms_binners.o Exports.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/… -framework R
    installing to /Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/00LOCK-MetaboAnalystR/00new/MetaboAnalystR/libs
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    Note: possible error in 'AddErrMsg("No QC samples found (by class label or name prefix ‘QC’). ", ': unused argument (“Please use non-QC based filtering.”)
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded from temporary location
    Error: package or namespace load failed for ‘MetaboAnalystR’ in namespaceExport(ns, exports):
    undefined exports: Plot.sampletrend, PlotImpVarMeta, RemoveMissingPercent, ReplaceMin, plot_dist
    Error: loading failed
    Execution halted
    ERROR: loading failed
  • removing ‘/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/MetaboAnalystR’
    Warning message:
    In i.p(…) :
    installation of package ‘/var/folders/4z/jz6m7r2j40v1_9r4ly75z7mc0000gn/T//RtmpraiwgT/filebe6a244136a6/MetaboAnalystR_4.0.0.tar.gz’ had non-zero exit status

How to install if I have this error:
package or namespace load failed for ‘MetaboAnalystR’ in namespaceExport(ns, exports):
undefined exports: Plot.sampletrend, PlotImpVarMeta, RemoveMissingPercent, ReplaceMin, plot_dist

1 Like

I’ve been trying to install MetaboAnalystR 4.0 (on Windows 11, R 4.5.1, RTools 4.5) and I am experiencing the same error. I have tried different versions of R, but I always encounter the same error.

Me too, I changed my R version as well, but still got the same error. Hopefully they can help us to solve this.

1 Like