Can't source Bash profile on Linux Cluster

瘦欲@ 提交于 2021-01-07 02:52:36

问题


This is a follow-up to my previous question:

Julia alias in .bashrc not working correctly

My main issue is that I cannot add Julia to my path on a Linux Cluster. If I go into the bin subfolder of the Julia folder, I can run Julia itself fine. However, I cannot edit the .bash_profile to get it into my path. As opposed to my previous question, I believe my issue has less with building an alias (or something Julia related) and more concerning my .bash_profile itself not updated.

The Julia file itself is located in

/gsfs0/data/heathjo/Downloads/julia-1.5.3/bin

I configured my .bash_profile as follows:

 if [ -f ~/.bashrc ]; then
        . ~/.bashrc 
 fi


 PATH=$PATH:$HOME/.local/bin:$HOME/bin

 export PATH=$PATH:$HOME/.local/heathjo/Downloads/julia-1.5.3/bin

 export PATH

If I run

source .bash_profile

I get the following issue:

 if: Expression Syntax.
 then: Command not found.

As such, it seems as if I run echo $PATH, Julia doesn't appear in my path, because it seems as if I can't source the .bash_profile. Am I doing something incorrectly?

来源:https://stackoverflow.com/questions/65534659/cant-source-bash-profile-on-linux-cluster

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!