MAC下NS3-GYM使用笔记

一、apt-get

参考https://www.finkproject.org/download/srcdist.php?phpLang=zh安装flink。不过20220114发现flink没有针对mac12.1的版本。那么只有再尝试安装brew。

在终端下输入命令(Mac自带ruby不需要安裝)

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

如果报错:

curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 4 ms: Connection refused

参考https://www.jianshu.com/p/c2e829027b0a,不过20220114尝试后并未解决。各种搜索后终于找到了比较靠谱的安装方法。

brew下载地址:
https://github.com/Homebrew/brew/blob/master/Library/Homebrew/cmd/install.rb

最正宗的安装指导:
https://docs.brew.sh/Installation

二、gdb

brew install gdb失败

原来,截止20220114,M1的处理器不支持gdb。
参考https://www.mejorcodigo.com/p/96102.html

Homebrew is not (yet) supported on ARM processors!
https://stackoverflow.com/questions/64882584/how-to-run-the-homebrew-installer-under-rosetta-2-on-m1-macbook

arch -x86_64 brew install gdb

按照上面的命令安装也会报错:

Error: gdb dependencies not built for the x86_64 CPU architecture:
  gmp was built for arm64
  pkg-config was built for arm64
  gdbm was built for arm64
  mpdecimal was built for arm64
  ca-certificates was built for arm64
  openssl@1.1 was built for arm64
  readline was built for arm64
  sqlite was built for arm64
  xz was built for arm64
  python@3.10 was built for arm64

原来Mac下的XCode应该已经默认把gdb改成lldb了。

三、附录

可参考https://github.com/hawtim/blog/issues/10修改host文件。
SwitchHosts下载地址:
https://github.com/oldj/SwitchHosts/releases
x64应该是intel的,可选择arm64的版本进行下载。

安装完成后使用brew install XXX即可。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

AlphaFinance

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

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

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

打赏作者

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

抵扣说明:

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

余额充值