Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I downloaded maven and spring boot CLI and tried to add their bin directories to the PATH of my Macbook OS: Catalina 10.13.5. I executed the following command to add Maven, Homebrew and Spring boot cli to the PATH:

export PATH=$PATH:/Users/debabrata/Documents/apache-maven-3.6.3/bin:/usr/local/Homebrew/bin:/Users/debabrata/downloads/spring-2.2.5.RELEASE/bin

After this I checked the PATH's contents

debabrata@Debabratas-MacBook-Air ~ % echo$PATH
zsh: no such file or directory: echo/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/bin:usr/local/bin:/bin:usr/sbin:/sbin:/opt/anaconda3/bin:/Users/debabrata/Documents/apache-maven-3.6.3/bin:/usr/local/Homebrew/bin:/Users/debabrata/downloads/spring-2.2.5.RELEASE/bin

Then I checked the spring boot CLI version:

debabrata@Debabratas-MacBook-Air ~ % spring --version
Spring CLI v2.2.5.RELEASE

It shows spring boot perfectly installed. Same for Maven and Homebrew which were added to the PATH. But after this, when I exited from the terminal and again opened this and checked echo $PATH it didn't show Mave/Spring boot CLI in the PATH. Also running spring --version given command not found.

debabrata@Debabratas-MacBook-Air ~ % echo $PATH
/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/bin:usr/local/bin:/bin:usr/sbin:/sbin:/opt/anaconda3/bin
debabrata@Debabratas-MacBook-Air ~ % spring --version
zsh: command not found: spring

What can be the reason behind this? How can I permanently add Maven and spring boot CLI to my Mac's PATH? Can someone please guide me?

Note: Earlier I installed Anaconda on mac and activated one base profile with it. After this whenever I was opening mac's terminal it was showing [base] at the start of the prompt. Then I deactivated the profile. Can this be the reason behind Maven and spring not getting added permanently to the PATH?

question from:https://stackoverflow.com/questions/65645810/cant-add-application-paths-to-macs-path-variable

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
142 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...