Amazon web services 无法连接到Heroku CLI

Amazon web services 无法连接到Heroku CLI,amazon-web-services,macos,heroku,heroku-cli,Amazon Web Services,Macos,Heroku,Heroku Cli,我在4个月前安装了heroku cli,并且使用得很好。但是今天我想再次登录。。然而,我不断地犯错误 zsh: command not found: heroku 然后我在网上搜索,甚至尝试运行“brew”命令,尽管我在“source~/.bash_profile”的路径中有这样的命令,但当我运行“brew”时,它仍然会告诉我: 这在我的道路上: # Ensure user-istalled binaries take precedence export PATH=/usr/local/bin

我在4个月前安装了heroku cli,并且使用得很好。但是今天我想再次登录。。然而,我不断地犯错误

zsh: command not found: heroku
然后我在网上搜索,甚至尝试运行“brew”命令,尽管我在“source~/.bash_profile”的路径中有这样的命令,但当我运行“brew”时,它仍然会告诉我:

这在我的道路上:

# Ensure user-istalled binaries take precedence
export PATH=/usr/local/bin:$PATH
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc
export PATH=$PATH:~/Desktop/bin
export PATH=/Library/PostgreSQL/13/bin:$PATH
export PATH=/usr/local/Homebrew/bin:$PATH
export PATH=/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/apt

我被困在这个问题上,似乎无法解决问题。

我解决了这个问题。。通过删除/删除我的mac中所有与HEROKU相关的文件。 然后我运行了以下命令:

curl https://cli-assets.heroku.com/install.sh | sh
我在不使用brew的情况下通过“其他安装方法”访问了它,并且它工作正常

curl https://cli-assets.heroku.com/install.sh | sh