[OS X Sierra] LSOpenURLsWithRole() failed with error -10810

Some newer version of OS X aren’t very verbose when it comes to security restrictions when trying to run a program that’s been downloaded. It may appear to crash and you can try to run it from the command line with:

# open ./downloadedpackage.app

That will get you the error:

LSOpenURLsWithRole() failed with error -10810 for the file downloadedpackage.app

Sometimes the error number will be different. You can check to see if the file is quarantined like this:

# xattr downloadedpackage.app

com.apple.quarantine

If you’re sure the file is safe to run you can change this attribute very easily:

# sudo xattr -r -d com.apple.quarantine downloadedpackage.app

With that attribute removed you should be able to run the app.