我最近创建了一个 python 应用程序,它通过 Bing 拖网并使用 WKHTMLTOPDF 将页面保存为 PDF,它是使用 Py2APP 构建的。
在我为 Xcode 更新命令行工具 (OS X 10.10) 之前,一切都运行良好,正如我希望的那样。
现在,每当我尝试运行该应用程序时,它都会立即崩溃,并且出现以下错误:
Time Awake Since Boot: 70 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Dyld Error Message:
Symbol not found: _getentropy
Referenced from: /Users/USER/*/EnglishSearch.app/Contents/Frameworks/Python.framework/Versions/3.5/Python (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 dyld 0x00007fff63035075 dyld_fatal_error + 1
1 dyld 0x00007fff630382a8 dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 180
2 libdyld.dylib 0x00007fff8c2983ba dyld_stub_binder + 282
3 ??? 0x00000001040af190 0 + 4362793360
4 org.python.python 0x000000010400d0b8 _Py_InitializeEx_Private + 375
5 org.pythonmac.unspecified.EnglishSearch 0x00000001000024ac 0x100000000 + 9388
6 org.pythonmac.unspecified.EnglishSearch 0x000000010000117a main + 650
7 org.pythonmac.unspecified.EnglishSearch 0x0000000100000be4 start + 52
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8db0c232 kevent64 + 10
1 libdispatch.dylib 0x00007fff8dc5b26e _dispatch_mgr_thread + 52
Thread 2:
0 libsystem_kernel.dylib 0x00007fff8db0b94a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff8941a3dd start_wqthread + 13
Thread 3:
0 libsystem_kernel.dylib 0x00007fff8db0b94a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff8941a3dd start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff8db0b94a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff8941a3dd start_wqthread + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00007fff6306d288 rbx: 0x0000000100200390 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x00007fff6306d3f0 rsi: 0x0000000000000000 rbp: 0x00007fff5fbfd290 rsp: 0x00007fff5fbfd278
r8: 0x00007fff63057b4c r9: 0x0000000000000000 r10: 0x00007fff6305afb6 r11: 0x00007fff6306d3f0
r12: 0x0000000000000018 r13: 0x0000000000000000 r14: 0x00007fff6306d3f0 r15: 0x0000000104130188
rip: 0x00007fff63035075 rfl: 0x0000000000000246 cr2: 0x000000010009c000
Logical CPU: 0
Error Code: 0x00000000
Trap Number: 3
我在网上搜索了一下,似乎是 CommandLineTools 的问题。我认为是这种情况,因为我尝试在我的另一台笔记本电脑上运行完全相同的应用程序,该应用程序已经有一段时间没有更新并且它有效。
我的 Xcode 版本是 2339,路径是 /Library/Developer/CommandLineTools
有谁知道如何解决这个错误?
谢谢 :)