【问题标题】:Missing proper which command. Make sure it is installed before using RVM缺少正确的哪个命令。确保在使用 RVM 之前已安装
【发布时间】:2023-03-19 08:16:01
【问题描述】:

我想我在 Mac 上安装了 Magnet 并删除了更好的触摸工具,然后我的终端突然得到这个:

Last login: Tue Aug 15 16:23:47 on ttys000

ERROR: Missing proper 'which' command. Make sure it is installed before using RVM!

WARNING:
      Errors sourcing '/Users/kenpeter/.rvm/scripts/base'.
      RVM will likely not work as expected.

ERROR: Missing proper 'which' command. Make sure it is installed before using RVM!

WARNING:
      Errors sourcing '/Users/kenpeter/.rvm/scripts/base'.
      RVM will likely not work as expected.

当我在终端中输入 which 时,它会起作用。

我的问题是,我该如何摆脱这个警告?

【问题讨论】:

    标签: ruby macos terminal rvm


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      我也收到了

      Missing proper which command. Make sure it is installed before using RVM

      启动我的 shell 时出现问题。

      我使用nvmavnrvm,并在我开始收到错误时通过yarn 全局安装了grunt-clikarma-clitypescripttypings。删除所有全局包后,错误消失了。

      我现在无法重现该问题,请自行计算。只是想我会分享,以防有人遇到类似问题。

      【讨论】:

        【解决方案3】:

        同样的问题,但我终于通过重新安装 RVM 让它工作了

        我在尝试这些问题中发布的解决方案时运气不佳:

        https://github.com/rvm/rvm/issues/2385

        https://github.com/rvm/rvm/issues/4378

        也不能通过Homebrew(重新)安装 RVM。我使用的是 macOS High Sierra 10.13.4 (17E199)。这是我的笔记:

        # uninstalling RVM: https://stackoverflow.com/a/4747195/539149
        rvm implode
        # then delete all mentions of RVM in ~/.bashrc ~/.bash_profile ~/.profile ~/.zshrc
        
        # installing RVM: http://usabilityetc.com/articles/ruby-on-mac-os-x-with-rvm/ https://rvm.io/rvm/install
        gpg --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
        brew tap --repair
        curl -sSL https://get.rvm.io | bash -s stable --ruby
        # add RVM to bash profile (usually in one of ~/.bashrc ~/.bash_profile ~/.profile ~/.zshrc)
        nano ~/.bashrc
        ###
        # Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
        export PATH="$PATH:$HOME/.rvm/bin"
        # Load RVM into a shell session *as a function*
        [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
        ###
        # reload shell settings
        source ~/.bash_profile
        
        # upgrading RVM: https://rvm.io/rvm/upgrading
        rvm get stable
        

        我意识到,如果您正处于一个着火的项目中间(或者可能是?),这不是最好的解决方案。但我认为始终拥有幂等的 sn-ps 很有帮助,您可以将其应用于补救情况,然后再进行优化。

        【讨论】:

          【解决方案4】:

          brew install node 为我修复了它,我在执行\which 时遇到了一些节点错误。

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2020-04-28
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2017-01-14
            • 2019-10-29
            相关资源
            最近更新 更多