0

When I execute the xattr command, it returns the error:

/usr/local/bin/xattr: /usr/local/opt/[email protected]/bin/python3.11: bad interpreter: No such file or directory

file /usr/bin/xattr returns:

/usr/bin/xattr: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/xattr (for architecture x86_64):   Mach-O 64-bit executable x86_64
/usr/bin/xattr (for architecture arm64e):   Mach-O 64-bit executable arm64e

which python3 returns /usr/bin/python3 and my env doesn't have any python entries.

This is my .zshrc file:

export PATH="/usr/local/sbin:$PATH"
export PATH="/usr/local/sbin:$PATH"

# Created by `pipx` on 2023-11-25 17:42:38
export PATH="$PATH:/Users/rhpt/.local/bin"

I do not have python 3.11 but I do have python 3.12 installed. Running Sonoma 14.2 on an Intel iMac.

I do not understand why xattr is trying to execute a python script. How can I get Terminal to use the executable instead of trying to execute python?

1
  • 3
    You installed a third-party xattr with Homebrew or something like that, and it's faulty or missing a dependency. If you want to use the system xattr, invoke it with the full path or create a shell alias.
    – Linc Davis
    Commented Jan 18 at 6:14

1 Answer 1

3

The error comes from /usr/local/bin/xattr, but you examine /usr/bin/xattr. So either remove the one in local, or replace /usr/local/opt/[email protected]/bin/python3.11 in the first line of the script with a path to an actually installed python version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .