如何修复 /bin /sh:GCC-11.3.0_1:找不到命令
尝试安装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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论