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

标签 linux bash shell centos

我遵循了 git 的这个设置: https://www.howtoforge.com/how-to-install-the-latest-git-version-on-centos 好像我的 bash 文件坏了。 给我这个错误: bash:“导出:找不到命令... -bash: export: `/usr/local/git/bin': 不是有效的标识符

对此有任何逐步解决方案吗?我尝试重新启动计算机,但它仍然出现。

最佳答案

你正在做这样的事情:

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

关于linux - bash: “export: command not found... -bash: export: `/usr/local/git/bin': 打开终端时不是有效标识符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34821913/

相关文章:

linux - 为什么我的 apache 进程不能写入我的世界可写文件?

python - Linux - 如何将位于多个子目录中的相同扩展名的文件直接复制到一个文件中?

php - 通过 php 将照片上传到 linux 服务器 - 一个文件夹可以拥有的最大文件数是多少?

shell - Redis 按哈希值中的模式删除哈希键

linux - 为什么有人会使用 echo 为 bash 或 ksh 中的变量赋值?

linux - svn 日志缺少修订

linux - Linux 中是否可以通过/sys 获取特定核心的当前 CPU 利用率?

bash - 检查 Shell 脚本 $1 是绝对路径还是相对路径

Bash 等待进程启动

shell - nohup - 权限被拒绝