Group Group Group Group Group Group Group Group Group

Error when trying to start book server in section 1.3

I get this error in Terminal when I tried to launch the book server. Any suggestions to fix?

Williams-iMac:00-book-server williamallen$ swift run
error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility “xctest”, not a developer tool or in PATH

Williams-iMac:00-book-server williamallen$

Hi Bill, could you share which macOS you have and what’s the output when you run:
swift --version

I have macOS Monterey 12.1. And this is the Swift version from Terminal:

Williams-iMac:~ williamallen$ swift --version

Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)

Target: x86_64-apple-darwin21.2.0

Williams-iMac:~ williamallen$

This looks good, I’m a little unsure what the problem might be, if you installed recently your current Xcode double-check that the command line tools are set in the preferences pane. When you click on Xcode/Preferences … select the tab “Locations” and check that the last drop down at the bottom shows the path to the toolchain you want to use from the command line:

That solved the problem. The Command Line in Xcode locations was empty. Thank you, Martin!

1 Like

Oh great, I’m glad it was just the preferences :slight_smile:

Thanks for sharing i have still confusion can anyone explain in details.

Hey Pietro, what specifically confuses you in the discussion?