【问题标题】:Heroku cli (brew install heroku): ArgumentError: user emixam23 doesn't existHeroku cli (brew install heroku): ArgumentError: user emixam23 doesn't exist
【发布时间】:2020-11-04 05:15:33
【问题描述】:

我正在尝试按照文档 https://devcenter.heroku.com/articles/heroku-cli#download-and-install 在我的 Mac 上安装 Heroku,但是在运行安装 heroku 的命令时遇到问题:

MBP-de-Emixam23:~ emixam23$ brew install heroku
Updating Homebrew...
==> Installing heroku from heroku/brew
==> Downloading https://cli-assets.heroku.com/homebrew/node-12.16.2.tar.xz
Already downloaded: /Users/emixam23/Library/Caches/Homebrew/downloads/5787f9331a645901d1511ff2973c961e1037248779c2b5628ec2601273fb979b--node-12.16.2.tar.xz
==> Downloading https://cli-assets.heroku.com/heroku-v7.42.4/heroku-v7.42.4.tar.
Already downloaded: /Users/emixam23/Library/Caches/Homebrew/downloads/15cbf813f5f04cde9c65e953825e9514cfe5f571108d68a5284521d8592bcf4f--heroku-v7.42.4.tar.xz
==> Installing dependencies for heroku/brew/heroku: heroku/brew/heroku-node
==> Installing heroku/brew/heroku dependency: heroku/brew/heroku-node
Error: An exception occurred within a child process:
  ArgumentError: user emixam23 doesn't exist

有什么想法吗? :o

感谢您的帮助

【问题讨论】:

  • 你运行过 brew doctor 吗?
  • 我进行了 brew 升级,再次尝试时一切正常:/不知道附加了什么

标签: macos heroku homebrew heroku-cli


【解决方案1】:

在我的例子中,问题是由环境变量 USER 引起的。

要找出可能导致问题的环境变量,请执行:

printenv | grep $TEXT_IN_ERROR

其中变量是以下值:

  ArgumentError: user $TEXT_IN_ERROR doesn't exist

【讨论】:

  • 对我来说也一样.. 只是我的 bash_profile 中设置的 USER 导致了问题
  • 对我来说也一样。它是 .zshrc 中的一个环境变量
  • 谢谢,忘记了 USER 是 unixland 中的一个特殊变量,并为我自己的目的设置了它。
猜你喜欢
  • 2013-04-07
  • 1970-01-01
  • 2020-03-13
  • 2017-11-04
  • 2018-06-16
  • 2021-02-14
  • 2019-01-01
  • 2015-08-02
  • 1970-01-01
相关资源
最近更新 更多