macos failed to execute dot. Is Graphviz installed? Error: exec: “dot“: executable

Homebrew是一款包管理工具,目前支持macOSlinux系统。主要有四个部分组成: brewhomebrew-corehomebrew-caskhomebrew-bottles

rew Homebrew 源代码仓库
homebrew-core Homebrew 核心源
homebrew-cask 提供 macOS 应用和大型二进制文件的安装
homebrew-bottles 预编译二进制软件包

Homebrew默认安装脚本:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

如果你遇到下面提示,就说明无法访问官方脚本地址:

Failed to connect to raw.githubusercontent.com port 443: Operation timed out

执行下面这个命令解决

/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"

安装完成:

OMEBREW_BREW_GIT_REMOTE set: using https://mirrors.ustc.edu.cn/brew.git for Homebrew/brew Git remote.

HOMEBREW_CORE_GIT_REMOTE set: using https://mirrors.ustc.edu.cn/homebrew-core.git for Homebrew/core Git remote.

==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:0cb1cc7af109437fe0e020c9f3b7b95c3c709b140bde9f991ad2c1433496dd42

##################################################################################################################### 100.0%

==> Pouring portable-ruby-2.6.8.yosemite.bottle.tar.gz

==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.

Read the analytics documentation (and how to opt-out) here:

  https://docs.brew.sh/Analytics

No analytics data has been sent yet (or will be during this `install` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:

  https://github.com/Homebrew/brew#donations

==> Next steps:

- 恭喜,安装成功!运行 `brew help` 开始体验吧

- 更多文档:

    https://docs.brew.sh

    https://brew.idayer.com

homebrew 下载好之后,用以下命令安装graphviz包。

brew install graphviz

安装完成

执行测试程序 ,生成 cpu.out 文件,

go test -bench . -cpuprofile cpu.out

执行:go tool pprof cpu.out  输入web 查询性能分析报告

liyongdeMacBook-Air:nonrepeating$ go tool pprof cpu.out

Type: cpu

Time: Jan 16, 2022 at 11:20am (CST)

Duration: 1.61s, Total samples = 1.58s (98.26%)

Entering interactive mode (type "help" for commands, "o" for options)

(pprof)   web

macos failed to execute dot. Is Graphviz installed? Error: exec: “dot“: executable_第1张图片

 

你可能感兴趣的:(macos)