xcrun invalid active developer path error in macOS - ios

I have recently updated my Mac to Catalina, but have been knitting Rmd documents just fine up to this point.
In a current document, I am getting the following error when I try to knit:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
I don't know why this particular markdown document is creating an issue when the others weren't. I have looked elsewhere on Stack, where I tried the following:
xcode-select --install
xcode-select --reset
Both of these lines of code just gave me an object not found error.
I ran these with no luck:
xcode-select --switch /Applications/Xcode.app
xcode-select --switch /Library/Developer/CommandLineTools
I then realized these commands should go in the terminal, but still have no luck.
I went to https://developer.apple.com/download/more/ and downloaded Command line tools OS Xcode 12.3dmg package.
I then tried all of the above code in the terminal, including:
sudo xcodebuild -license accept
Now, instead of giving me the error message that I started with, the knit just loads indefinitely.
At this point, I'm just throwing crap at the wall, without knowing what it is that I'm actually doing. Any guidance from this point is greatly appreciated. Thank you!

May be the issue was view() instead of View().

Related

Appium doctor shows error

When I run Appium doctor it shows:
Running iOS Checks
✖ Unknown SW Version Command: Error: Command failed: /bin/sh -c sw_vers -productVersion
/bin/sh: sw_vers: command not found
Appium-Doctor detected problems. Please fix and rerun Appium-Doctor.
Can anyone help let me know what is the wrong here?
running this solved my problem:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
You need to install the command line tools as marked in your message:
✖ Xcode Command Line Tools are NOT installed
From osxDaily:
Launch the Terminal, found in /Applications/Utilities/
Type the following command string:
xcode-select --install
A software update popup window will appear that asks: “The xcode-select command requires the command line developer tools. Would you like to install the tools now?” choose to confirm this by clicking “Install”, then agree to the Terms of Service when requested (feel free to read them thoroughly, we’ll be here)
Wait for the Command Line Tools package download to complete, it’ll be about 130MB and installs fairly quickly depending on your connection speed
The installer goes away on its own when complete, and you can then confirm everything is working by trying to use one of the commands that were just installed, like gcc, git, svn, rebase, make, ld, otool, nm, whatever you want from the list below. Assuming the installation went uninterrupted, the command will execute as expected. This also means you can compile and install things from source code directly without having to use a package manager. Enjoy your new unix command line toolkit!
Have you tried upgrading to the latest Appium version? Are you installing Appium through terminal? My appium-doctor issues were fixed after I installed Appium through terminal and updated the path variables in .bash profile. Appium desktop application is different than one installed through command line.
There are only two possible area which causing that error:
You need to keep all path veriable updated and correct in .bash_profile
You must install
XCode
NodeJS
properly. You must have all permission to access those.
Install all latest version of following things
JDK (Java Development Kit),
Xcode ,
Command Line tools ,
APPIUM For MAC OS
In my case, xcode command line tool isn't set. Simply go to Xcode>Preferences>Locations>Select desired Xcode version in Command Line Tools. OR from terminal follow Chhagan's answer xcode-select -s your path

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

I upgraded my Mac to 10.10.3 and Xcode to 6.3.1 yesterday; today I can't use git, codesign_allocate....and more.
`sh: line 1: 18421 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -find codesign_allocate 2> /dev/null
codesign_allocate: error: unable to find utility "codesign_allocate", not a developer tool or in PATH
/Users/ylx/Library/Developer/Xcode/DerivedData/test-ahpvhmtqeafuveekexklyxulvmfa/Build/Products/Debug-iphoneos/test.app/Frameworks/libswiftCore.dylib: the codesign_allocate helper tool cannot be found or used
*** error: Couldn't codesign /Users/ylx/Library/Developer/Xcode/DerivedData/test-ahpvhmtqeafuveekexklyxulvmfa/Build/Products/Debug-iphoneos/test.app/Frameworks/libswiftCore.dylib: codesign failed with exit code 1
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-stdlib-tool failed with exit code 1`
Try running the following command:
locate codesign_allocate
Note, you may need to run this command and wait a couple minutes if your locate DB isn't updated:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Then see all the spots where codesign_allocate exists. On my system, it shows up in the following locations:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/Library/Developer/CommandLineTools/usr/bin/codesign_allocate
/usr/bin/codesign_allocate
Then ensure at least one of these is on your $PATH.
echo $PATH | tr : '\n'
On my system, /usr/bin is on my $PATH, so Xcode finds it just fine. If codesign_allocate isn't available on your $PATH, you've got two options:
Add it to your path. I.e. edit your ~/.bashrc and add this line to the end (Note, you can use any path that codesign_allocate exists on. The path I'm using is just to illustrate):
export PATH=$PATH:/Library/Developer/CommandLineTools/usr/bin/
Create a symbolic link to your command line tools somewhere on a directory in your path:
sudo ln -s /Library/Developer/CommandLineTools/usr/bin/* /usr/bin/
Hope this helps! Note, on installation of a new Xcode version, you may want to revisit this and ensure you're using the correct paths. Assuming you install over previous versions of Xcode, you should be okay, but it's something to keep in mind.
Have you tried if xcodebuild command work as expected and if you have any Xcode plugins in the plugins Folder located at ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins who can cause this issue.
Upgrading to Xcode 6.4 fixed it for me.
I struggled with this almost all afternoon and started to think it would be the end for me.
Hopefully I found a solution that might help other people. I started to wonder after I saw this error again and again :
sh: line 1: 18421 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -find codesign_allocate 2> /dev/null
codesign_allocate: error: unable to find utility "codesign_allocate", not a developer tool or in PATH
I took #sandy's answer and checked the different paths where I could find codesign_allocate. I got a pretty good hint after running both of these command:
$ /usr/bin/codesign_allocate
sh: line 1: 26890 Abort trap: 6 ...
$ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
Usage: .../codesign_allocate -i input [-a <arch> <size>] [-A <cputype> <cpusubtype> <size>]... -o output
Thus I simply replaced my local /usr/bin/codesign_allocate with the one from xcode and that fixed all my problems.
sudo cp -r /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin/
I hope this can help other people; good luck everybody.
For my case it's because the free storage of my Mac is almost zero.
Clean up my disk solves the problem.
Sometimes issue is with path of Xcode's command line tool which could be fixed by fixing path of XCode. Please check path of XCode with command xcode-select -p. If it shows incorrect XCode path then you can use command
sudo xcode-select -s PATH_TO_XCODE_DEVELOPER_FOLDER.
For example, sudo xcode-select -s "/Application/XCode.app/Contents/Developer"
Clean up + reopen xcode worked for me

Objective c-Symbolication issue Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash line 60

Error shown in the terminal
:Resources myDirectory$ ./symbolicatecrash /foldername/myapp_2014-04-02-130024_Review-Machine.crash /foldername/myapp.app.dSYM
Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash line 60.
I was trying to symbolicate my app but this error is shown.I have read many of the tutorials about symbolication and gone through the way.Even someone had this same issue and the solution i have tried out ie,creating a new folder and adding the .app,.dSYM and crash files.
The foldername in the error is the new folder i have created.
But i still get this error.Is this way wrong??
I have even tried by symbolicating through Xcode by adding to Organiser but didn't work!!!!1
Anybody has any idea what is the problem here???Please help i am new to this..
add as a first line of your script that runs symbolicatecrash script:
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
By the way, you've copied symbolicatecrash script to some folder from it's initial location?
Follow two steps to find and export missing DEVELOPER_DIR
Output of xcode-select --print-path on terminal is the value of DEVELOPER_DIR, something like, /Applications/Xcode.app/Contents/Developer
Run the following command in the Terminal app, or insert into ~/.bashrc if using Bash:
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer

Command line tools download in Xcode disappeared after Mavericks

After having installed Mavericks I got this problem on a code that compiled without problems before.
xcode-select --install triggers the installation without any strange problems,
yet when I try to build something with Eclipse it gives me
"Include path not found (/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include)"
Infact in /Applications/Xcode.app/Contents/Developer/usr/ there's no llvm-gcc-4.2.
How can I fix this?
On my system in terminal:
/usr/bin/llvm-gcc-4.2
produces:
/usr/bin/llvm-gcc-4.2
/usr/bin/llvm-gcc-4.2
is linked to :
/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
Also
$ which llvm-gcc
produces:
/usr/bin/llvm-gcc
and
/usr/bin/llvm-gcc is linked to /usr/bin/clang
Note that Apple no longer provides llvm-gcc as an option in Xcode so perhaps it is no longer supplied as a command-line tool.
I had problems with the command line tools as well after upgrading to Mavericks, despite having updated Xcode, and I am quite sure I also installed the command line tools. Still, you can add them "by hand" downloading from apple site. I am not sure if it is any sort of bug of such, but anyway, I recommend you to download the latest Mavericks' Command Line Tools (late October) on Apple's developer site (needs free registration)

iOSOpenDev command line tool build error

Okay, so i have spent all day searching the web for why this is happening.
I have installed the iOSOpenDev XCode Templates, and I opened a new command line tool project, and its giving me this error:
target specifies product type 'com.apple.product-type.tool', but there's no such product type for the 'iphoneos' platform
Does anyone know how to fix this? thanks in advance.
This must be an installation issue. Re-install iOSOpenDev and check if there are errors in its installer log. I had the same problem and resolved it with the following two steps.
1) xcode-select must point to the correct xcode location, for example run the following line in Terminal:
$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
2) You must agree xcode license in Terminal
$ sudo xcodebuild -license
$ xcodebuild -license
After that, reinstall the tool and it should work.

Resources