Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS build issue after update to macOS Monterey (12.3) #9833

Closed
3 tasks done
ipald opened this issue Mar 19, 2022 · 7 comments
Closed
3 tasks done

iOS build issue after update to macOS Monterey (12.3) #9833

ipald opened this issue Mar 19, 2022 · 7 comments

Comments

@ipald
Copy link

ipald commented Mar 19, 2022

Issue Description

Hello all,
after updating my Mac to 12.3 (macOS Monterey) Xcode fails in archive/build with the error:

env: python: No such file or directory
Command Ld failed with a nonzero exit code

I cannot find any information about this error except this thread on stackoverflow (where I've posted because proposed solution doesn't work in my case)

The issue occurs with any app.

Someone have any suggestion?

Reproduction

Open XCode
Select any workspace
From top menu selct "Product > Archive"

Relevant log output (if applicable)

./.build_env_vars.sh: line 454: declare: UID: readonly variable
NSLD: Swift bridging header '*-Swift.h' not found under '/Users/projects/Library/Developer/Xcode/DerivedData/myapp-emltoukfgkimqnglbyjtvysfhqvp/Build/Intermediates.noindex/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/myapp.build/Release-iphoneos/app4box.build/Objects-normal/arm64'
Generating metadata...~/Projects/myfolder/myapp/platforms/ios/internal/metadata-generator-arm64/bin ~/Projects/myfolder/myapp/platforms/ios
env: python: No such file or directory
Command Ld failed with a nonzero exit code

Environment

OS: macOS 12.3
CPU: (8) x64 Apple M1
Shell: /bin/zsh
node: 12.22.10
npm: 6.14.16
nativescript: 8.1.5

# android
java: 11.0.14
ndk: Not Found
apis: 22, 30, 32
build_tools: 22.0.1, 30.0.3, 32.0.0, 32.1.0
system_images: 
  - android-29 | Google APIs ARM 64 v8a
  - android-30 | Google APIs ARM 64 v8a
  - android-32 | Google APIs ARM 64 v8a

# ios
xcode: 13.2.1/13C100
cocoapods: 1.11.2
python: 3.9.10
python3: 3.9.10
ruby: 2.7.5
platforms: 
  - DriverKit 21.2
  - iOS 15.2
  - macOS 12.1
  - tvOS 15.2
  - watchOS 8.3

Dependencies

"dependencies": {},
"devDependencies": {}

Please accept these terms

@ipald ipald added the bug-pending-triage Reported bug, pending triage to confirm. label Mar 19, 2022
@shilik
Copy link

shilik commented Mar 19, 2022

Monterey 12.3 removes python 2.
All you need to do is to reinstall python2 back to system from this link
https://www.python.org/downloads/release/python-2718/

@ipald
Copy link
Author

ipald commented Mar 19, 2022

Thanks @shilik the solution worked flawlessy!

@ipald ipald closed this as completed Mar 19, 2022
@OliverKoo
Copy link

Did you have to disable SIP to be able to install under /usr/bin ?

@rzhang90
Copy link

Monterey 12.3 removes python2. In my case, my python is linked to python2, so it shows the error "env: python: No such file or directory".
Because I've installed python3.8, so instead of reinstalling python2, I point python to python3 by adding the following line to ~/.zshrc:

alias python=/usr/bin/python3

You can check the location of python3 by whereis python3.
Then run source ~/.zshrc.
Now when you check your python version, you'll get

xxx % python --version
Python 3.8.9

And my problem "env: python: No such file or directory" is solved.

@rigor789
Copy link
Member

See our notes in the docs:

Screenshot 2022-04-27 at 8 43 30 PM

https://docs.nativescript.org/environment-setup.html#macos-ios

@phenric
Copy link

phenric commented Jun 12, 2022

I've already done what @rzhang90 & @rigor789 did and it works in the zsh terminal.
My issue seems to be due to the shell used. Since I prompted a ns clean the NS uses sh instead of zsh.
How could I force NS to use ZSH?

@rigor789 rigor789 removed the bug-pending-triage Reported bug, pending triage to confirm. label Nov 14, 2022
@jhonjoffre
Copy link

@rigor789 hi bro

I have somewhat kinda same issue, and I did I saw your notes and follow them thru but I am stuck at this point sudo ln -s $(which python3) /usr/local/bin/python the terminal response is: ln: /usr/local/bin/python: No such file or directory then I have research and the folder /local/ does not exist at all, so looking more closely I found the dependences that the command is trying to reach by removing /local/ sudo ln -s $(which python3) /usr/bin/python but I get this in return n: /usr/bin/python: Operation not permitted

I've made a specific post about this issue here: https://github.com/orgs/NativeScript/discussions/10236

any help will be greatly appreciated.

Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants