添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
儒雅的松鼠  ·  ant design ...·  1 年前    · 
性感的板凳  ·  wpf listview 点击事件-掘金·  1 年前    · 

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

0 人关注

I followed this setup for 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': not a valid identifier

有什么步骤可以解决这个问题吗?我试着重新启动我的电脑,但它仍然出现。

5 个评论
你一定没有正确地复制命令。显示你实际做了什么。或者贴出 /etc/bashrc 的最后一行。在博客的最后还有一个评论,其中包含了比博客本身更好的命令。
It probably relates to this: echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc which is just silly (the $ should be escaped) but shouldn't produce the error described unless it was changed in the cut & paste.
@Barmar I did this: echo "PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
你应该使用评论中的命令,博客中的代码是错误的。
是的,它确实起作用了。但现在我出现了错误。你能帮我解决这个问题吗?
linux
bash
shell
centos
Gamaliel
Gamaliel
发布于 2016-01-16
1 个回答
glenn jackman
glenn jackman
发布于 2016-01-16
已采纳
0 人赞同

你正在做这样的事情。

export $var

var的值是/usr/local/git/bin。替换代码2】想要一个变量名称.