ChatGPT解决这个技术问题 Extra ChatGPT

How do I fix the xcrun unable to find simctl error?

I have Xcode 6.2 Beta. Attempting

xcrun simctl 

in terminal yields

xcrun: error: unable to find utility "simctl", not a developer tool or in PATH

My app was running without issue then suddenly I came across this. I had no license to agree to and command line tools was set. A simple reboot of my machine worked.
please select correct answer

s
skywinder

I solved this problem by entering

Xcode > Preferences > Locations 

And assigning the Command Line Tools

https://i.stack.imgur.com/Tfhrg.png


Worked with me too
"assigning the Common Line Tools" ... nice, but why aren't they set on install? haha
great answer. Thanks!
Worked With me.
Great! After updating to Catlina 10.15.3 it simply disappeared.
s
shim

In Xcode, open the Xcode menu at the top, then select Preferences…, and then select the Locations tab.

https://i.stack.imgur.com/nMZnt.png


This makes it a lot more clear how to make the change, thanks for pic!
G
Gulshan Nadaph

Got similar issue on executing command

./Scripts/bootstrap.sh -d.

This helped me Xcode > Preferences > Locations, Set Command line Tools

https://i.stack.imgur.com/kSOuz.png


How classic issue..
l
leonardosccd

In Terminal, try this.

sudo xcode-select -s /Applications/Xcode.app

/Applications/Xcode.app is your Xcode.app path.

if U still get error in terminal.

try sudo xcodebuild -license to agree license.


j
jsr

I had the same problem. My application was working well but suddenly in next run, it started throwing the "simctl" error. It seems I had started Xcode update installation in the background.

Fix: I just started the Xcode application and it prompted to install some pending tools update. After Xcode updates, my app started working normally.


s
shim

While running Xcode, open the Xcode menu, go to Preferences…, then select Locations

In Locations, "Command Line Tools", choose your version of Xcode.

It should be fine. This worked for me.


A
Amogam

Choose Xcode Preferences then choose Locations tab and inside go to command line tools Drop down box and choose one.

Problem sovled !

FYI: I tried this with Xcode 12.3


S
Serzas

If you are interested in command line "approach", please try: installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /. In addition, please make sure that xcode-select -s selected right Xcode installation path.


A
Anshu

adding xcode in preference-> locations works fine


Adding command line tools as xcode version in preference-> locations works fine