bash:“export:command not found ... -bash:export:`/ usr / local / git / bin':打开终端时不是有效的标识符

时间:2016-01-16 00:01:55

标签: linux bash shell centos

我按照git的这个设置: https://www.howtoforge.com/how-to-install-the-latest-git-version-on-centos 好像我的bash文件坏了。 给我这个错误: bash:“export:command not found ... -bash:export:`/ usr / local / git / bin':不是有效的标识符

任何一步一步解决这个问题?我尝试重新启动计算机,但它仍然出现。

1 个答案:

答案 0 :(得分:1)

你正在做这样的事情:

export $var

var的值为/ usr / local / git / bin。 export想要一个变量 name

$ var=/usr/local/git/bin
$ export $var
bash: export: `/usr/local/git/bin': not a valid identifier