You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

macOS Catalina 10.15.4下R包simmer安装失败求助

Solution for simmer package compilation failure on macOS Catalina 10.15.4

I’ve run into similar compilation headaches with C++-based R packages on Catalina, so I know how frustrating this can be. Here are several actionable approaches to get the simmer package installed successfully:

1. Start with the stable CRAN version

Skip the GitHub development build first and try the pre-tested CRAN release—this often avoids compatibility issues with older macOS versions:

install.packages("simmer")

2. Fix the compilation error for the GitHub version

If you specifically need the latest GitHub code, address the uuid_t type definition errors with these steps:

  • Update Xcode Command Line Tools
    Catalina’s SDK sometimes has header mismatches that cause these types of errors. Reinstall the command line tools to ensure you have the correct system headers:

    xcode-select --install
    

    Restart RStudio after installation, then retry the GitHub install command.

  • Force include the required uuid header
    The error happens because the compiler can’t find the definition of uuid_t. Tell the C++ compiler to include the necessary header upfront by setting this environment variable in R before installing:

    Sys.setenv(CXXFLAGS = "-include /usr/include/uuid/uuid.h")
    devtools::install_github("r-simmer/simmer")
    
  • Update the BH (Boost Headers) package
    Your error trace shows the issue stems from interactions between the BH package’s Boost headers and macOS SDK headers. Update BH to the latest version first:

    install.packages("BH")
    

    Then try installing simmer again.

  • Use the pak package for more robust installation
    The pak package handles dependencies and compilation more smoothly than devtools for GitHub-hosted packages. Install pak first, then use it to install simmer:

    install.packages("pak")
    pak::pak("r-simmer/simmer")
    

3. Try a pre-compiled binary

If compilation still fails, check for a pre-built binary for your system. For the CRAN version, you can explicitly request binary installation:

install.packages("simmer", type = "binary")

内容的提问来源于stack exchange,提问作者allfriend

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 07:18:16