菜鸟教程小白 发表于 2022-12-13 10:06:44

ios - 删除/private/tmp 后无法启动 iOS 模拟器


                                            <p><p>本周我无法启动我的模拟器,我尝试了一些文章中的几种解决方案,但它不起作用。我的 MacOS 版本是 OS X 10.10.5 (14F27),我的模拟器是 iOS 8.4。</p>

<p>我从 <em>~/Library/Logs/CoreSimulator/CoreSimulator.log 获取日志</em></p>

<blockquote>
<p>Aug 27 11:29:14 LL-MBP.local CoreSimulatorService : Could
not register service com.apple.SystemConfiguration.PPPController:
launch_sim_register_endpoint: 0xfffffecc Aug 27 11:29:14 LL-MBP.local
CoreSimulatorService : Could not register service
com.apple.audio.audiohald: launch_sim_register_endpoint: 0x44e Aug 27
11:29:14 LL-MBP.local CoreSimulatorService : Could not
register service
com.apple.coreservices.lsuseractivity.simulatorsupport:
launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local
CoreSimulatorService : Could not register service
com.apple.FSEvents: launch_sim_register_endpoint: 0x44e Aug 27
11:29:14 LL-MBP.local CoreSimulatorService : Could not
register service com.apple.SystemConfiguration.configd:
launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local
CoreSimulatorService : Could not register service
IndigoHIDRegistrationPort: launch_sim_register_endpoint: 0x44e Aug 27
11:29:14 LL-MBP.local CoreSimulatorService : Could not
register service PurpleFBTVOutServer: launch_sim_register_endpoint:
0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService :
Could not register service PurpleFBServer:
launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local
CoreSimulatorService : Error Domain=NSPOSIXErrorDomain
Code=60 &#34;Unable to boot the iOS Simulator.&#34; UserInfo=0x7fbb204683f0
{NSLocalizedDescription=Unable to boot the iOS Simulator.,
NSLocalizedFailureReason=launchd failed to respond.} Aug 27 11:29:14
LL-MBP.local CoreSimulatorService : Error
Domain=NSPOSIXErrorDomain Code=60 &#34;Unable to boot the iOS Simulator.&#34;
UserInfo=0x7fbb204683f0 {NSLocalizedDescription=Unable to boot the iOS
Simulator., NSLocalizedFailureReason=launchd failed to respond.} Aug
27 11:29:14 LL-MBP.local CoreSimulatorService : Error
Domain=com.apple.CoreSimulator.SimError Code=146 &#34;Unable to lookup in
current state: Shutdown&#34; UserInfo=0x7fbb20808710
{NSLocalizedDescription=Unable to lookup in current state: Shutdown}
Aug 27 11:29:14 LL-MBP.local CoreSimulatorService : Error
looking up host support port Aug 27 11:29:14 LL-MBP.local
CoreSimulatorService : Error
Domain=com.apple.CoreSimulator.SimError Code=146 &#34;Invalid device
state&#34; UserInfo=0x7fbb2083b420 {NSLocalizedDescription=Invalid device
state} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService
: Error Domain=com.apple.CoreSimulator.SimError Code=146
&#34;Unable to lookup in current state: Shutdown&#34; UserInfo=0x7fbb2080c350
{NSLocalizedDescription=Unable to lookup in current state: Shutdown}
Aug 27 11:29:14 LL-MBP.local CoreSimulatorService : Error
Domain=com.apple.CoreSimulator.SimError Code=146 &#34;Unable to lookup in
current state: Shutdown&#34; UserInfo=0x7fbb2080c350
{NSLocalizedDescription=Unable to lookup in current state: Shutdown}
Aug 27 11:29:14 LL-MBP.local com.apple.iphonesimulator :
Error Domain=NSPOSIXErrorDomain Code=60 &#34;Unable to boot the iOS
Simulator.&#34; UserInfo=0x7fda2a9020f0 {NSLocalizedDescription=Unable to
boot the iOS Simulator., NSLocalizedFailureReason=launchd failed to
respond.} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService
: Error Domain=com.apple.CoreSimulator.SimError Code=146
&#34;Unable to lookup in current state: Shutdown&#34; UserInfo=0x7fbb20b0f850
{NSLocalizedDescription=Unable to lookup in current state: Shutdown}
Aug 27 11:29:14 LL-MBP.local CoreSimulatorService : Error
looking up host support port Aug 27 11:29:14 LL-MBP.local
CoreSimulatorService : Error
Domain=com.apple.CoreSimulator.SimError Code=146 &#34;Invalid device
state&#34; UserInfo=0x7fbb20b00e20 {NSLocalizedDescription=Invalid device
state}</p>
</blockquote>

<p>有人对此有任何想法吗? </p>

<p>我会很感激的!</p>

<p>最后我在@Jeremy Huddleston Sequoia 的帮助下解决了这个问题。一开始,我在网上尝试了很多解决方案,包括删除/private/tmp 文件夹。所以无论我清理多少次重新安装模拟器,它都不起作用。所以要小心这个</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>这些错误表明 launchd_sim 未加载或未运行,并且看门狗已触发以通知您失败。</p>

<p>如果您在 OS X 10.10.5 中禁用 AMFI,模拟器运行时将无法使用,并且会像这样显示。</p>

<p>但是,在您的情况下,launchd_sim 在启动时崩溃。崩溃日志表明它在尝试在/private/tmp 中创建其状态目录时遇到错误。</p>

<p>这可能发生在您删除/private/tmp (或错误地重新创建它)。要创建/private/tmp,请执行以下操作:</p>

<pre><code>sudo mkdir /private/tmp
sudo chmod 1777 /private/tmp
</code></pre></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 删除/private/tmp 后无法启动 iOS 模拟器,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/32239906/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/32239906/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 删除/private/tmp 后无法启动 iOS 模拟器