AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 769566
Accepted
ZZ9
ZZ9
Asked: 2016-04-12 09:19:40 +0800 CST2016-04-12 09:19:40 +0800 CST 2016-04-12 09:19:40 +0800 CST

无法在 Windows 上使用 sensu-install - gem & ruby​​ bin 不在系统路径中[关闭]

  • 772
关闭。这个问题是题外话。它目前不接受答案。

问题应展示合理的商业信息技术管理实践。与不受支持的硬件或软件平台或未维护的环境相关的问题可能不适合服务器故障 - 请参阅帮助中心。

6年前关闭。

改进这个问题

尝试使用 sensu-install 时失败,因为它找不到 Gem/Ruby:

C:\opt\sensu\bin\sensu-install.bat -p sensu-plugins-windows:0.0.10

[SENSU-INSTALL] installing Sensu plugins ...
[SENSU-INSTALL] provided Sensu plugins: ["sensu-plugins-windows:0.0.10"]
[SENSU-INSTALL] compiled Sensu plugin gems: ["sensu-plugins-windows:0.0.10"]
[SENSU-INSTALL] determining if Sensu plugin gem 'sensu-plugins-windows:0.0.10' is already installed ...
[SENSU-INSTALL] gem list -i sensu-plugins-windows --version '0.0.10'
[SENSU-INSTALL] Sensu plugin gem 'sensu-plugins-windows' has not been installed
[SENSU-INSTALL] Sensu plugin gems to be installed: ["sensu-plugins-windows:0.0.10"]
[SENSU-INSTALL] installing Sensu plugin gem 'sensu-plugins-windows:0.0.10'
[SENSU-INSTALL] gem install sensu-plugins-windows --version '0.0.10' --no-ri --no-rdoc --verbose
[SENSU-INSTALL] failed to install Sensu plugin gem 'sensu-plugins-windows'
[SENSU-INSTALL] please take note of any failure messages above
[SENSU-INSTALL] make sure you have build tools installed (e.g. gcc)
[SENSU-INSTALL] trying to determine the Sensu plugin homepage for sensu-plugins-windows ...
'gem' is not recognized as an internal or external command,
operable program or batch file.
sensu
  • 1 1 个回答
  • 937 Views

1 个回答

  • Voted
  1. Best Answer
    ZZ9
    2016-04-12T09:23:40+08:002016-04-12T09:23:40+08:00

    这是由安装程序的嵌入式 ruby​​ 和 gem 二进制文件C:\opt\sensu\embedded\bin\未添加到系统路径引起的。

    这可以通过在提升的 powershell 中运行以下命令来解决,该命令将嵌入式 bin 目录添加到系统路径(持久):

    $CurrentPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path
    $NewPath=$CurrentPath+’;C:\opt\sensu\embedded\bin\’
    Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH –Value $NewPath
    

    您现在可以成功运行以下命令:

    sensu-install -p sensu-plugins-windows:0.0.10
    
    • 1

相关问题

  • Sensu 仅处理每 180 次出现

  • sensu 删除客户的支票

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve