如何修复 /bin /sh:GCC-11.3.0_1:找不到命令

发布于 2025-01-30 15:40:04 字数 1519 浏览 5 评论 0原文

尝试安装rtidyhtml从rstudio(2022.02.2 build 485)的Github远程使用R版本4.2.0,我告诉我/bin/sh:GCC-11.3.0_1:命令:命令:找不到。这是在通过Homebrew安装GCC并创建〜/.r/Makevars的详细信息之后:

VER=-11.3.0_1
CC=gcc$(VER)
CXX=g++$(VER)
CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion

运行brew list-versions gcc,返回gcc 11.3。 0_1

运行gcc-version返回:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

我的路径是

/opt/homebrew/opt/openssl@3/bin:/Library/Frameworks/GDAL.framework/Programs:/Library/Frameworks/Python.framework/Versions/3.9/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

哪个gcc返回gcc是/usr/usr/bin/gcc

我不知道如何使rstudio识别正确的路径,从而如何编译包装。我感谢故障排除建议。

在M1 Mac上运行Macos Monterey(v12.2)。

xpost on https:https:// community。 rstudio.com/t/how-to-to-troubleshoot-c-compiler-problems-on-mac/137675 ,但没有回应。

When trying to install RTidyHTML remotely from Github on RStudio (2022.02.2 Build 485) with R version 4.2.0, I'm told /bin/sh: gcc-11.3.0_1: command not found. This is after installing gcc through homebrew and creating an ~/.R/Makevars with the following details:

VER=-11.3.0_1
CC=gcc$(VER)
CXX=g++$(VER)
CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion

Running brew list --versions gcc, return gcc 11.3.0_1,

Running gcc --version returns:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

My PATH is

/opt/homebrew/opt/openssl@3/bin:/Library/Frameworks/GDAL.framework/Programs:/Library/Frameworks/Python.framework/Versions/3.9/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

which gcc returns gcc is /usr/bin/gcc.

I don't know how to make RStudio recognize the correct path and thus how I'm able to compile packages. I'd appreciate troubleshooting advice.

Running macOS Monterey (V12.2) on an M1 Mac.

Xposted on https://community.rstudio.com/t/how-to-troubleshoot-c-compiler-problems-on-mac/137675 but no response.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文