How to Fix ‘The Operation Couldn’t Be Completed (OSStatus error -67061)’ in macOS

Attempting to launch self-compiled developer binaries, command-line tools, or third-party open-source applications on macOS Sonoma or Sequoia often terminates with the terminal error: The operation couldn't be completed. (OSStatus error -67061) or kSecCSUnsigned / Code signature invalid. In macOS security architecture, OSStatus error -67061 translates directly to errSecCSUnsigned. This indicates that the macOS kernel Gatekeeper and Security framework refused execution because the Mach-O binary lacks a valid digital cryptographic code signature or possesses broken entitlements.

Why Does macOS Throw OSStatus Error -67061?

The execution refusal is enforced by Apple’s strict code integrity subsystem:

  • Unsigned Mach-O Binary: Compiling code locally with GCC, Clang, or Go without applying an ad-hoc or developer code signature.
  • Broken Code Signature Seals: Modifying resource bundles, plist manifests, or dynamic libraries inside an existing .app bundle after signing.
  • Gatekeeper Extended Quarantine Attribute: Downloading unsigned binaries via web browsers attaching the com.apple.quarantine extended file attribute.
  • Apple Silicon (ARM64) Mandatory Signing Policy: On Apple Silicon Macs (M1/M2/M3/M4), the kernel strictly forbids running any ARM64 binary that lacks at least an ad-hoc code signature.

Step 1: Check Binary Signature Details Using codesign

Verify whether the binary is completely unsigned or has invalid signature seals.

  1. Open Terminal on your Mac.
  2. Run the codesign verification command against your binary or application bundle:
    codesign -dvvv /path/to/application_or_binary
  3. If the output returns code object is not signed at all or invalid signature (code or signature have been modified), the signature must be applied afresh.

Step 2: Apply an Ad-Hoc Code Signature

Satisfy Apple Silicon and Gatekeeper requirements by applying a valid local ad-hoc signature.

  1. In Terminal, execute the following command (replacing the path with your binary path):
    codesign --force --deep --sign - /path/to/application_or_binary
  2. The -s - flag applies an ad-hoc signature recognised by the local macOS kernel.
  3. Verify the newly applied signature:
    codesign -v /path/to/application_or_binary
  4. If no output is returned, the signature verification succeeded.

Step 3: Remove Gatekeeper Quarantine Extended Attributes

Strip web download quarantine flags preventing execution.

  1. Check if the quarantine attribute exists on the file:
    xattr -l /path/to/application_or_binary
  2. If com.apple.quarantine is present, delete it:
    xattr -d com.apple.quarantine /path/to/application_or_binary
  3. For complete .app bundles, clear attributes recursively:
    sudo xattr -cr /Applications/YourApp.app
  4. Execute the application; macOS will launch the program without triggering error -67061.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.