jenv: jenv: no such command `enable-plugin'

Hello, I’m facing a weird issue on my mac. Whenever I try:

$> jenv enable-plugin maven                                                                                                         10:09  fbiville@VID01701
jenv: no such command `enable-plugin'

However,

$> jenv help enable-plugin                                                                                                          10:09  fbiville@VID01701
Usage: jenv enable-plugin <pluginName>

Activate a jEnv plugin

What’s going on?

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

brew install jenv
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(jenv init -)"' >> ~/.bash_profile
source .bash_profile
cd /Library/Java/JavaVirtualMachines |ls -l
jenv add /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
jenv add /Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
jenv global 1.8.0_162
jenv enable-plugin maven
jenv enable-plugin export
exit 
javac -version

In my case I use brew to install jenv, so I didn’t follow this sentence:

$ echo 'eval "$(jenv init -)"' >> ~/.bash_profile

executing it, solve the problem.

check: vi ~/.bash_profile or vi ~/.bashrc file. See if there are multiple entries of eval "$(jenv init -)" and get single entry for requested commands. execute source ~/.bash_profile In my case this was happening.

Can you give me the output of :

  • jenv doctor
  • jenv --version

This resolved the problem for me

➜ ~ eval "$(jenv init -)" >> /Users/<your-user>/.zshrc

jenv doctor gave me the good diagnosis 😃 Now fixed 😃

How were you able to fix it ?

ssrivastava$ jenv --version
jenv 0.2.0-20140426
ssrivastava$ jenv doctor
[OK]	No JAVA_HOME set
[OK]	Java binaries in path are jenv shims
[OK]	Jenv is correlly loaded

I am unable to install the export plugin

ssrivastava$ jenv enable-plugin export
export plugin does not exist

In my case I use brew to install jenv, so I didn’t follow this sentence:

$ echo 'eval "$(jenv init -)"' >> ~/.bash_profile

executing it, solve the problem.

After installing jenv via brew install jenv, in the output of jenv doctor, I could see

[ERROR]	Jenv is not loaded in your bash
[ERROR]	To fix : 	cat eval "$(jenv init -)" >> /Users/nikhilsahu/.bash_profile

The objective was to insert a line into ~/.bash_profile This should instead be

[ERROR]	To fix : 	echo 'eval "$(jenv init -)"' >> ~/.bash_profile