0

I've installed Ansible on macOS 13.1 (Ventura) with Homebrew. After updating $PATH to include /opt/homebrew/bin so I can execute ansible commands. However, the man pages for Ansible (man ansible, man ansible-galaxy, etc.) do not work. The ansible man pages when installed with Homebrew are located at:

/opt/homebrew/Cellar/ansible/7.1.0/share/man/man1

How can I have the man command on macOS reference these pages?

2 Answers 2

2

Even though I had eval "$(/opt/homebrew/bin/brew shellenv)" in ~/.zprofile and $MANPATH was /opt/homebrew/share/man::, I'm assuming there was some symlinking problems as I noticed after brew uninstall ansible that ansible was still present in /opt/homebrew/bin/ and the ansible command was still symlinked to it.

After doing rm /opt/homebrew/bin/ansible* and brew install ansible, ansible man pages are now working.

1

The variable from which man works out where to look is MANPATH

From the bree manual page https://docs.brew.sh/Manpage#shellenv and your comment on updating PATH I think you have not fully followed the install instructions

Consider adding evaluation of this command’s output to your dotfiles (e.g. ~/.profile, ~/.bash_profile, or ~/.zprofile) with: eval "$(brew shellenv)"

Typing brew shellenv will show the updates needed for PATH MANPATH etc if you want to do it manually.

1
  • My ~/.zprofile did contain eval "$(/opt/homebrew/bin/brew shellenv)" and echo $MANPATH is /opt/homebrew/share/man::.
    – cloud_hack
    Dec 26, 2022 at 23:07

You must log in to answer this question.

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