首页 > 解决方案 > 在 Mac OS X Catalina 上安装 valgrind

问题描述

我在新更新的 Mac OS X Catalina 上安装 Valgrind 时遇到问题。

当我尝试得到这个错误

brew install valgrind
valgrind: This formula either does not compile or function as expected on macOS
versions newer than High Sierra due to an upstream incompatibility.
Error: An unsatisfied requirement failed this build.

然后在将 HEAD url 更改为url "git://sourceware.org/git/valgrind.git"AND 并尝试通过安装它之后

brew install --HEAD valgrind
==> Cloning git://sourceware.org/git/valgrind.git
Updating /xxxx/Caches/Homebrew/valgrind--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 2d040ce2c arm: Hook up preadv2 and pwritev2 syscalls.
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/valgrind/HEAD-2d040ce --enable-only64bit --build=amd64-darwin
Last 15 lines from /xxx/Homebrew/valgrind/02.configure:
checking for gcc-ar... no
checking for perl... /usr/bin/perl
checking for gdb... /no/gdb/was/found/at/configure/time
checking dependency style of clang... none
checking for diff -u... yes
checking for clang option to accept ISO C99... none needed
checking for a supported version of gcc... ok (clang-11.0.0)
checking build system type... x86_64-pc-darwin
checking host system type... x86_64-pc-darwin
checking for a supported CPU... ok (x86_64)
checking for a 64-bit only build... yes
checking for a 32-bit only build... no
checking for a supported OS... ok (darwin)
checking for the kernel version... unsupported (19.2.0)
configure: error: Valgrind works on Darwin 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x and 17.x (Mac OS X 10.6/7/8/9/10/11 and macOS 10.12/13)

而且它们都不起作用。任何帮助表示赞赏。

标签: macoshomebrewvalgrind

解决方案


推荐阅读