macosflutterdartzshaqueduct

zsh: command not found: pub


I'm getting this error message when try to install aqueduct on macOS Catalina with this command.

pub global activate aqueduct

I managed to install it by putting flutter in front of it but now I cannot run aqueduct. I tried

aqueduct --version

I get an error again

zsh: command not found: aqueduct

Here is my .zshrc file (I've added last second line to try to fix it)

export PATH="$PATH:/Users/peter/development/tools/flutter/bin"
export PATH="$PATH":"$HOME/.pub-cache/bin"

I don't know what else to do...


Solution

  • Well, I don't know what is aqueduct, but this is a common way to solve such issues:

    1. When you see $ zsh: command not found: aqueduct,

    run $ which aqueduct - it shouldn't work.

    If it works, then the shell does know about a binary named aqueduct.

    1. Find out in which folder aquedict is located, and add the path to it in export PATH=..., like in you did in .zshrc file.

    2. If you found aquedict binary, and it still fails to work, try adding it permissions to execute:

    chmod +rwx aquedict

    1. If you didn't found aquedict binary, read the docs again. :)

    In your case it's https://aqueduct.io/docs/getting_started/ ,

    and the first step is to install Dart: https://dart.dev/get-dart