我看水群的时候有开发者说 macOS 15 不能用命令行允许任何来源的应用程序了,然后发来解决方案,自己试了一下有效。

下载或新建 Allow Anywhere.mobileconfig (这个地方是可以点击下载的):

Allow Anywhere.mobileconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?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>PayloadContent</key>
<array>
<dict>
<key>GKAutoRearm</key>
<false/>
<key>PayloadDisplayName</key>
<string>Security</string>
<key>PayloadIdentifier</key>
<string>com.apple.security.B4ED8D14-3057-4D1A-83E1-6E736719D8BC</string>
<key>PayloadType</key>
<string>com.apple.security</string>
<key>PayloadUUID</key>
<string>B4ED8D14-3057-4D1A-83E1-6E736719D8BC</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
<dict>
<key>EnableAssessment</key>
<false/>
<key>PayloadDisplayName</key>
<string>System Policy: Control</string>
<key>PayloadIdentifier</key>
<string>com.apple.systempolicy.control.CDBB207C-6CC3-49CB-BE72-6E8AA884A933</string>
<key>PayloadType</key>
<string>com.apple.systempolicy.control</string>
<key>PayloadUUID</key>
<string>1084332C-8ABD-494C-BBF5-0EA497063A27</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</array>
<key>PayloadDisplayName</key>
<string>Allow Anywhere</string>
<key>PayloadIdentifier</key>
<string>Sushi-MacBook-Pro.2D778521-874E-4648-BD01-AFF15EAA2EFB</string>
<key>PayloadScope</key>
<string>System</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>F31CB31B-46BB-42B0-9941-085AF3D5EE3E</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>TargetDeviceType</key>
<integer>5</integer>
</dict>
</plist>

双击安装即可。然后检查系统设置 “隐私与安全性> 安全性”:

安全性