ohmyzsh: compinit:527: no such file or directory: /usr/local/share/zsh/site-functions/_docker_compose

Describe the bug

When I open zsh on vs code terminal, the warning compinit:527: no such file or directory: /usr/local/share/zsh/site-functions/_docker_compose appear on it. I saw an issue is the same as mine, but it doesn’t work.

Steps to reproduce

  1. open vs code project
  2. open terminal(default use zsh)
  3. show compinit:527: no such file or directory: /usr/local/share/zsh/site-functions/_docker_compose

Expected behavior

I want to don’t show it on my terminal. Thank you.

Screenshots and recordings

No response

OS / Linux distribution

macOS ventura 13.4.1

Zsh version

5.9

Oh My Zsh version

master (1c55a0fe)

Terminal emulator

VS Code terminal

If using WSL on Windows, which version of WSL

None

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Reactions: 2
  • Comments: 18 (7 by maintainers)

Most upvoted comments

Running brew cleanup && rm -f $ZSH_COMPDUMP && omz reload should solve the issue.

@Talljack try the code below and also tell us whether you changed your Homebrew setup from Intel to ARM as this user found:

ls -l /usr/local/share/zsh/site-functions/_docker_compose
ls -l /usr/local/share/zsh/site-functions/_docker_compose(:A)

@LuoJimmy try brew cleanup as in #9602 (comment).

Thank you very much! I solved it by this:

ln -fsv /opt/homebrew/completions/zsh/_brew /usr/local/share/zsh/site-functions/_brew_cask  
ln -fsv /opt/homebrew/completions/zsh/_brew /usr/local/share/zsh/site-functions/_brew

I had a similar problem on wsl and I’ve solved it. My reported error was something like this: coinit:527: no such file or directory: /usr/share/zsh/vendor-completions/_docker The cause of my problem is that the file /usr/share/zsh/vendor-completions/_docker is softlinked to /mnt/wsl/docker-desktop/cli-tools/usr/share/zsh/vendor-completions/_docker, and my docker-desktop was uninstalled, when I looked at the directory /usr/share/zsh/vendor-completions/ I found the _docker file was red, so I just needed to delete this file and everything worked fine!

sudo rm /usr/share/zsh/vendor-completions/_docker

I have a similar problem!

compinit:527: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask

image

Just wanted to say that:

brew cleanup && rm -f $ZSH_COMPDUMP && omz reload

As suggested by @carlosala initially resolved this issue for me.

This is the result of executing code image You are right, I updated my MAC system from Intel to ARM(change my MAC), but it was three months ago, and the problem only appeared recently.

Possibly you’re hit by https://github.com/docker/for-mac/issues/6343 and you updated Docker recently. The right path should be in /Applications/Docker.app/Contents/Resources/etc/docker (try looking on that path and finding the right file), or otherwise not exist under that path (in which case, you should remove the symlink).

Confirmed not happening because of OMZ.

@Talljack try the code below and also tell us whether you changed your Homebrew setup from Intel to ARM as this user found:

ls -l /usr/local/share/zsh/site-functions/_docker_compose
ls -l /usr/local/share/zsh/site-functions/_docker_compose(:A)

@LuoJimmy try brew cleanup as in https://github.com/ohmyzsh/ohmyzsh/issues/9602#issuecomment-768663375.

Try rm $_comp_dumpfile as well.