简体   繁体   中英

bash: “export: command not found… -bash: export: `/usr/local/git/bin': not a valid identifier when opening terminal

I followed this setup for git: https://www.howtoforge.com/how-to-install-the-latest-git-version-on-centos and seemed like my bash file is broken. gives me this error: bash: “export: command not found... -bash: export: `/usr/local/git/bin': not a valid identifier

Any step by step solution to this? I tried restarting my computer but it still appears.

You are doing something like this:

export $var

and var has the value /usr/local/git/bin. export wants a variable name .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM