onevcat / FengNiao

A command line tool for cleaning unused resources in Xcode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to lookup item 'PlatformPath' from command line tools installation

joseines opened this issue Β· comments

I'm using Xcode 15, with Mint installed via Brew.
Any ideas how can this be resolved?

joseines@Jose-MacBook-2023 desktop % mint install onevcat/fengniao --verbose
🌱 Finding latest version of fengniao
🌱 Cloning fengniao 0.8.1
Cloning into 'github.com_onevcat_fengniao'...
remote: Enumerating objects: 128, done.
remote: Counting objects: 100% (128/128), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 128 (delta 20), reused 108 (delta 17), pack-reused 0
Receiving objects: 100% (128/128), 132.50 KiB | 1.46 MiB/s, done.
Resolving deltas: 100% (20/20), done.
Note: switching to '7fd538bed2ec6f3da4172ae1ba5285f2e7a35fdf'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

🌱 Resolving package
error: terminated(1): /usr/bin/xcrun --sdk macosx --show-sdk-platform-path output:
    xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
    xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
    
🌱 Encountered error during "swift package resolve"
🌱  Failed to resolve fengniao 0.8.1 with SPM
joseines@Jose-MacBook-2023 desktop % 

I cannot reproduce this issue and the CLI tool can be installed properly with mint.

It seems like an environment issue on your mac. Specifically, you need the Xcode command line tool installed and the toolchain is used properly. Can you check and follow this answer and see if that solves?

Thankyou @onevcat !
Your link worked, this is the exact process I used:

$ xcrun --show-sdk-path --sdk macosx

You might have this result:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

Switch the default SDK location by invoking:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer