最近更新了一下zerotier,退出了原来的网络,导到zerotier再也无法正常启动,一直提示 :wating for zerotier system service 重装软件也无法解决。
解决方法:
创建配置文件
sudo vim /Library/LaunchDaemons/com.zerotier.one.plist
写入文件内容
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.zerotier.one</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES exec "/Library/Application Support/ZeroTier/One/zerotier-one"</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
</dict>
</plist>
加载并启动服务
sudo launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist 2>/dev/null
sudo launchctl load -w /Library/LaunchDaemons/com.zerotier.one.plist
问题回顾与总结
简单来说,这个问题根本原因在于:新版macOS(尤其是Apple Silicon机型)加强了运行时安全,而ZeroTier 1.16.1版本的启动方式触发了系统的“fork安全检查”,导致进程被系统强制崩溃。 我们通过创建一个启动包装脚本,设置特定的环境变量(OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES),让系统允许该操作,从而绕过了这个限制。
Related Posts
2022年3月25日
How to Trust your Intuition when You’re Making a Decision
When you are alone for days or weeks at a time, you eventually become drawn to…
2022年3月22日
Everyday inspired by the Beauty of the Mountains
Last year I wrote about why booking too far in advance can be dangerous for…
2022年3月20日
How to Appreciate the Little Things in Life and be Happy
Just the other day I happened to wake up early. That is unusual for an…


