Ruby Motion 8.0 Swift Runtime Fix

When issuing the command motion doctor, I get an error stating that Swift’s runtime is not installed and offered a fix:

sudo cp -r /usr/lib/swift/*.dylib /Library/Frameworks/CommandLineTools/
sudo touch /Library/Frameworks/CommandLineTools/.swift-5-staged

When I issue the first command I just get a general usage message:

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory

I’m running macOS Monterey 12.0.1. Any ideas?

I’ve fixed this issue. I had to initially create a directory “CommandLineTools” at /Library/Frameworks/ for the command to work.

Seems to be a permissions issue. I hope this helps someone else.