[英]Missing proper which command. Make sure it is installed before using RVM
I think I install Magnet in Mac and remove better touch tool, then my terminal suddenly gets this: 我想我在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.
When I type which in terminal, it works. 当我在终端中键入时,它可以工作。
My question is that, how do I get rid of this warning? 我的问题是,如何摆脱这个警告?
I did yarn global install xxxx
. 我做了
yarn global install xxxx
。 It causes rvm to complain. 它导致rvm抱怨。
yarn global remove xxxx
Fix the issue. 解决该问题。
Ref: 参考:
https://issues.jenkins-ci.org/browse/JENKINS-20636?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel https://issues.jenkins-ci.org/browse/JENKINS-20636?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel
https://github.com/yarnpkg/yarn/issues/2064 https://github.com/yarnpkg/yarn/issues/2064
I also received the 我也收到了
Missing proper which command. Make sure it is installed before using RVM
issue when starting my shell. 启动外壳程序时出现问题。
I use nvm
, avn
, and rvm
and had grunt-cli
, karma-cli
, typescript
, and typings
installed globally via yarn
when I started getting the error. 我用
nvm
, avn
和rvm
并有grunt-cli
, karma-cli
, typescript
及typings
通过全球的装机量yarn
,当我开始得到错误。 After removing all of the global packages, the error disappeared. 删除所有全局软件包后,错误消失了。
I cannot reproduce the issue now, go figure. 现在,我无法重现该问题,请确定。 Just thought I'd share in case anyone has a similar issue.
我以为我愿意和别人分享类似的问题。
Same issue, but I finally got it working by reinstalling RVM . 同样的问题,但是我终于通过重新安装RVM使其工作了 。
I didn't have much luck trying the solutions posted in the issues for this: 我为此尝试发布在问题中的解决方案没有太多运气:
https://github.com/rvm/rvm/issues/2385 https://github.com/rvm/rvm/issues/2385
https://github.com/rvm/rvm/issues/4378 https://github.com/rvm/rvm/issues/4378
Nor with (re)installing RVM through Homebrew . 也不能通过Homebrew (重新)安装RVM。 I'm on macOS High Sierra 10.13.4 (17E199).
我使用的是macOS High Sierra 10.13.4(17E199)。 Here are my notes:
这是我的笔记:
# 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
I realize this isn't the greatest solution if you're in the middle of a project that's on fire (or maybe it is?). 我意识到,如果您正在一个正在进行中的项目中(也许是这样?),这不是最佳解决方案。 But I think it's helpful to always have idempotent snippets that you can apply to remedy a situation, then optimize things later.
但是我认为始终保留幂等的片段是很有用的,您可以将其应用于补救情况,然后在以后进行优化。
brew install node
为我修复了它,执行\\which
时出现一些节点错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.