Gamaliel
Gamaliel

Reputation: 77

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.

Upvotes: 0

Views: 2665

Answers (1)

glenn jackman
glenn jackman

Reputation: 247192

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

Upvotes: 1

Related Questions