【问题标题】:Homebrew Password Prompt自制密码提示
【发布时间】:2013-11-13 13:35:42
【问题描述】:

您好,我正在尝试设置我的 Mac 以运行 Ruby on Rails,但我一直在尝试安装 Homebrew 和 RVM。

当我输入终端时:

 ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

它返回它返回通常的文本块,并在它显示的末尾:

 WARNING: Improper use of the sudo command could lead to data loss
 or the deletion of important system files. Please double-check your
  typing when using sudo. Type "man sudo" for more information.

 To proceed, enter your password, or type Ctrl-C to abort.

Password:

当我尝试输入我的 root 密码时,没有任何反应,唯一返回内容的输入是按下回车键,该键返回消息“对不起,重试”。

当我尝试为 RVM 运行安装时,也会发生同样的事情:

  Searching for binary rubies, this might take some time.
  Found remote file https://rvm.io/binaries/osx/10.9/x86_64/ruby-2.0.0-p247.tar.bz2
  Checking requirements for osx.
  Installing  macports.................................................................................................................
 ..............................................................
     connorashton password required for 'make install': .......

它再次不允许我输入任何内容。还可能需要注意的是,它没有显示文本光标,而是有一个小的灰色矩形。

非常感谢任何帮助!

感谢您的 cmets 我终于把事情搞定了,现在已经通过了密码提示。然而,RVM 现在又出现了另一个错误:

  Downloaded archive checksum did not match, archive was removed!
  If you wish to continue with not matching download add '--verify-downloads 2' after 
   the          command.

  Downloading https://rvm.io/binaries/osx/10.9/x86_64/ruby-2.0.0-p247.tar.bz2 failed.
   Mounting remote ruby failed, trying to compile.
    connorashton password required for 'softwareupdate -l': 

所以我重新输入了我的密码,它又开始运行,但又回来了:

   Retrieving rubygems-2.1.11
   There is no checksum for 'http://production.cf.rubygems.org/rubygems/rubygems-     
     2.1.11.tgz' 
     or 'rubygems-2.1.11.tgz', it's not possible to validate it.
    This could be because your RVM install's list of versions is out of date. 
      You may want    to
     update your list of rubies by running 'rvm get stable' and try again.
    If that does not resolve the issue and you wish to continue with unverified download
     add '--verify-downloads 1' after the command.

     There has been an error while trying to fetch rubygems. 
      Halting the installation.

抱歉,我只是想让这件事启动并运行!

【问题讨论】:

  • 您好,我在创建自己的帖子之前阅读了该帖子,但没有从中得到任何答案。我在主管理员帐户上运行它(我的 mac 上没有其他用户),并且我还按照苹果的说明设置了 root 访问密码。
  • sudo 不会询问您的root 密码,而是询问当前帐户的密码。你试过吗? (另外,这正是 Ororuk 链接的问题中所说的公认答案)
  • 是的,问题是它在提示我输入密码后不允许我输入任何内容。这可能是由 Xcode 命令行工具的问题引起的吗?我似乎也遇到了问题,因为在我安装了命令工具后,当我输入 $ gcc 或 $ xcode-select -p /Library/Developer/CommandLineTools 时,它会返回“clang:错误:没有输入文件”
  • no input files 实际上只是意味着gcc 找不到要编译的源文件。要查看命令是否可用,您通常会打印其版本。对于大多数命令行程序,这可以使用[command name] -v 完成,有时也可以使用--version 或很少使用-V。例如,gcc -v 将打印类似 gcc version 4.7.4 的内容以及许多其他信息。

标签: ruby-on-rails ruby rvm homebrew


【解决方案1】:

sudo 将隐藏您键入的字符。因此,在您键入密码时,控制台中没有显示任何内容是正常的。只需输入您当前帐户的密码,然后按 Enter

同时确保您的帐户具有以下管理员权限:

System Preferences > Users & Groups > [Your Name] > Allow user to administer this computer

【讨论】:

  • 感谢它终于通过了密码提示屏幕!但是,我现在遇到了 RVM 安装的另一个问题,我已将其添加到我原来的帖子中,如果您能给我一些建议,那就太好了。
  • @ConnorAshton 该错误意味着无法验证源代码的完整性。您可以使用--verify-downloads 1 再次运行以忽略它,但更好的解决方案是解决此问题。您是否按照错误消息的提示使用 rvm get stable 更新了 RVM?
  • 我最初确实尝试了'rvm get stable',但它似乎没有做任何事情,但在我重试后它现在正在工作,所以我一定是写错了。现在似乎一切正常,非常感谢您的帮助。
  • 很高兴我能帮上忙。干杯!
【解决方案2】:

对于其他可能仍有问题的人,我启用了root 用户,将我的用户设为管理员,授予我的用户 sudo 权限,但仍然无法通过密码提示。否则 Sudo 权限按预期工作(例如,sudo ls)。

给自己无密码的 sudo 权限终于让我通过了安装脚本。

【讨论】:

猜你喜欢
  • 2017-10-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-11-13
  • 2017-01-24
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多