プログラミングスクール最大70%OFF! ←クリックして見に行く

【Error】Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or qu…

【Error】Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or qu…

エラー解消方法の備忘録_φ(・_・ )

発生したエラー

XcodeでRunしようとしたら以下エラーが表示されました。
Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding

翻訳

launchd_sim の起動に失敗しました: セッションにバインドできませんでした、 launchd_sim がクラッシュしたか応答を終了した可能性があります。

原因

スティッキービットの設定が出来ていない場合に表示されるエラー

以下のターミナルコマンドで実行権部分の確認をします。

ls -ld /private/tmp

drwxr-xr-x 11 root wheel 352 5 10 16:31 /private/tmp

文頭の「drwxr〜」の最後の文字が「t」になっていれば、
スティッキービットの設定が出来ています。

上記は「x」になっているので、設定ができていないようです。

Memo

スティッキービットとは、
UNIX系OSのファイルシステムで設定される特殊なアクセス権の一つであり、
主にディレクトリに対して設定します。

解決手順

・以下コマンドで「tmp」ディレクトリにスティッキービット設定をする

sudo chmod 1777 /tmp

・設定できたか確認

ls -ld /private/tmp
//結果: drwxrwxrwt  19 root  wheel  608  5 10 16:50 /private/tmp
Point

「drwxr〜」の最後の文字が「t」になっていればOKです!

参考サイト

https://gist.github.com/takaishota/4f881fe019940281c8f417554f686457

【Failed to start launchd_sim】エラーが表示されてシミュレータが使えなかったときの対処


https://developer.apple.com/forums/thread/667088
https://stackoverflow.com/questions/65172944/when-running-on-older-ios-simulator-error-failed-to-start-launchd-sim-could-n
https://stackoverflow.com/questions/40238266/launchd-sim-crashing-could-not-create-temporary-state-directory
https://kazmax.zpp.jp/linux_beginner/stickybit.html

Swiftカテゴリの最新記事