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

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

rewHomebrew 源代码仓库
homebrew-coreHomebrew 核心源
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

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

_Fighter

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值