Skip to content

Plugin won't work if zsh is not shipped with pcre #23

Description

@akire0ne

Hi and thanks for your very nice zsh plugin.

I had issues insalling it on my 2021 Macbook Pro (M1 Max, Ventura 13.6.2)

After install, Auto complete failed with this error message

❯ ssh _parse_config_file:6: failed to load module `zsh/pcre': dlopen(/usr/lib/zsh/5.9/zsh/pcre.so, 0x0009): tried: '/usr/lib/zsh/5.9/zsh/pcre.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/zsh/5.9/zsh/pcre.so' (no such file), '/usr/lib/zsh/5.9/zsh/pcre.so' (no such file, not in dyld cache)
_parse_config_file:6: -pcre-match not available for regex
  ssh

Thanks to some google I was able to find a similar issue / fix: zthxxx/jovial#12

Long story short: System installed zsh (/bin/zsh) does not include pcre

I was able to fix by using zsh from brew. You need to do the following commands

brew reinstall zsh 
brew reinstall pcre pcre2
sudo chsh -s `/opt/homebrew/bin/zsh` $USER
(launch new terminal and you should be good)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions