“Bash:export:" path”:启动git bash windows 7时不是有效的标识符 [英] "Bash: export:"path": not a valid identifier when starts git bash windows 7

查看:162
本文介绍了“Bash:export:" path”:启动git bash windows 7时不是有效的标识符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 bash:export:`Files / Skype / Phone:/ c / Program ' :不是有效的标识符
bash:export:`Files / Microsoft'
:不是有效的标识符
bash:export:`Server / 100 / Tools / Binn:/ c / Program < span class =code-string>' :不是有效的标识符
bash:export:`Files / Microsoft'
:不是有效的identifier
bash:export:`Server / 100 / DTS / Binn:/ c / Program ' :not a有效标识符
bash:export:`Files / Microsoft'
:不是有效的标识符
bash:export:`Server / 100 / Tools / Binn / VSShell / Common7 / IDE:/ c /程序' :不是有效的标识符
bash:export:`Files / Microsoft'
:not not有效的标识符
bash:export:`9.0 / Common7 / IDE / PrivateAssemblies:%USERPROFILE%/。dnx / bin:/ c / Program ' :不是有效的标识符
bash:export:`Files / Microsoft'
:不是有效的标识符
bash:export:`DNX / Dnvm:/ c / Program ' :不是有效的标识符
bash:export:`Files / nodejs:/ c / Users / dell / AppData / Roaming / npm:/ usr / bin / vendor_perl:/ usr / bin / core_perl:/ usr / bin'
:不是有效的标识符





获取在Windows 7中打开git bash时出现此错误



之后运行任何命令如grunt或npm时出现错误

 bash:npm :命令未找到





我的导出变量如下

Quote:

dell @ dell-PC MINGW32 / d / ProacDoc

$ export

declare -x!::

声明-x ACLOCAL_PATH =/ mingw32 / share / aclocal:/ usr / share / aclocal

声明-x ALLUSERSPROFILE =C:\\ProgramData

声明-x APPDATA =C:\\Users \\\\\\ \\ APPData \\Roaming

声明-x COMMONPROGRAMFILES =C:\\Program Files \\Common Files

declare -x COMPUTERNAME = DELL-PC

声明-x COMSPEC =C:\\ Windows\\system32 \\ cmd.exe

声明-x DISPLAY =需要定义

声明-x EXEPATH =C:\\Program Files \\ Git

声明-x FP_NO_HOST_CHECK =否

声明-x HOME =/ c / Users / dell

声明-x HOMEDRIVE =C:

声明-x HOMEPATH =\\Users \\ dell

声明-x HOSTNAME =dell-PC

声明-x INFOPATH = / usr / local / info:/ usr / share / info:/ usr / info:/ share / info:

declare -x LANG =en_US.UTF-8

声明-x LOCALAPPDATA =C:\\Users \\\\\\AppData \\本地

声明-x LOGONSERVER =\\ \\DELL-PC

声明-x MANPATH =/ mingw32 / share / man:/ usr / local / man:/ usr /分享/男人:/ usr / man:/ s hare / man:

声明-x MSYSTEM =MINGW32

声明-x NUMBER_OF_PROCESSORS =4

声明-x OLDPWD

声明-x OS =Windows_NT

声明-x PATH =/ c / Users / dell / bin:/ mingw32 / bin:/ usr / local / bin:/ usr / bin:/ bin:/ mi ngw32 / bin:/ usr / bin:/ c / Users / dell / bin:/ c / Windows / system32:/ c / Windows :/ c / Windows / S ystem32 / Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/ c / Program

declare -x PATHEXT =。COM; .EXE;。 BAT; .CMD; .VBS; .VBE; .JS; .JSE; .WSF; .WSH; .MSC

声明-x PKG_CONFIG_PATH =/ mingw32 / lib / pkgconfig:/ mingw32 / share / pkgconfig

声明-x PLINK_PROTOCOL =ssh

声明-x PRINTER =发送到OneNote 2007

声明-x PROCESSOR_ARCHITECTURE =x86

声明-x PROCESSOR_IDENTIFIER =x86 Family 6 Model 42 Stepping 7,GenuineIntel

声明-x PROCESSOR_LEVEL =6

声明-x PROCESSOR_REVISION =2a07

声明-x PROGRAMFILES =C:\\程序文件

声明-x PS1 =\\ [\\ 033] 0; \ $ TITLEPREFIX:\ $ {PWD // [^ [:ascii:]] /?} \\007 \\] \\\\\\ [\\ 033 [32m\\] \\\\ @ \\\\\\ [\\03333 [35m\\] \ $ MSYSTEM \\ [\\ 033 [33m\\] \\\\\\ [\\ 033 36m \\] \`_ git_ps1 \\\\\ [\\ 033 [0m\ ] \\\\
\ $

声明-x PSModulePath =C:\\Windows \\system32 \\ WindowsPowerShell \\\\\\\\\\\\\\\\\\\ \模块\\

声明-x PUBLIC =C:\\Users\\Public

声明-x PWD =/ d / ProacDoc

声明-x ProgramData =C:\\ProgramData

声明-x SESSIONNAME =控制台

declare -x SHELL =/ usr / bin / bash

声明-x SHLVL =1

声明-x SQL

声明-x SSH_ASKPASS =/ mingw32 / libexec / git-core / git-gui - askpass

声明-x SYSTEMDRIVE =C:

声明-x SYSTEMROOT =C:\\ Windows

声明-x Studio

声明-x TEMP =/ tmp

声明-x TERM =xterm

声明-x TMP =/ tmp





我尝试过:



我已经google了一下,并尝试通过设置环境变量,导出PATH和重新安装nodejs等解决方案,并尝试gitbash其他一些

解决方案

export

声明-x!::

声明-x ACLOCAL_PATH =/ mingw32 / share / aclocal:/ usr / share / aclocal

声明-x ALLUSERSPROFILE =C:\\ \\\ProgramData

声明-x APPDATA =C:\\Users \\\\\\AppData \\Roaming

声明-x COMMONPROGRAMFILES =C:\\Program Files \\Common Files

声明-x COMPUTERNAME =DELL-PC

声明-x COMSPEC =C:\\Windows\\system32 \\ cmd.exe

声明-x DISPLAY =需要定义

声明-x EXEPATH =C:\\Program Files \\ Git

声明-x FP_NO_HOST_CHECK =否

声明-x HOME =/ c / Users / dell

声明-x HOMEDRIVE =C:

声明-x HOMEPATH =\\\用户\\ dell

声明-x HOSTNAME =dell-PC

声明-x INFOPATH =/ usr / local / info:/ usr / share / info:/ usr / info:/ share / info:

declare -x LANG =en_US.UTF-8

declare -x LOCALAPPDATA =C: \\Users\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ >
declare -x MANPATH =/ mingw32 / share / man:/ usr / local / man:/ usr / share / man:/ usr / man:/ s hare / man:

声明-x MSYSTEM =MINGW32

声明-x NUMBER_OF_PROCESSORS =4

声明-x OLDPWD

声明-x OS =Windows_NT

声明-x PATH =/ c / Users / dell / bin:/ mingw32 / bin:/ usr / local / bin:/ usr / bin:/ bin:/ mi ngw32 /斌:在/ usr / bin中:/ C /用户/ DELL /斌:/ C /窗/ SYSTEM32: / c / Windows:/ c / Windows / S ystem32 / Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/ c / Program

declare -x PATHEXT =。COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS; .JSE; .WSF; .WSH; .MSC

声明-x PKG_CONFIG_PATH =/ mingw32 / lib / pkgconfig :/ mingw32 / share / pkgconfig

声明-x PLINK_PROTOCOL =ssh

声明-x PRINTER =发送到OneNote 2007

声明-x PROCESSOR_ARCHITECTURE =x86

声明-x PROCESSOR_IDENTIFIER =x86 Family 6 Model 42 Stepping 7,GenuineIntel

声明-x PROCESSOR_LEVEL =6

声明-x PROCESSOR_REVISION =2a07

声明-x PROGRAMFILES =C:\\Program Files

声明-x PS1 =\\ [\\033] 0; \

TITLEPREFIX:\

{// PWD [^ [ :ASCII:?]] /} \\007\\] \\\\
\\ [\\ 033 [32m \\] \\\\ @ \\\\\\ [\\ 033 [35m\\] \


bash: export: `Files/Skype/Phone:/c/Program': not a valid identifier
bash: export: `Files/Microsoft': not a valid identifier
bash: export: `Server/100/Tools/Binn:/c/Program': not a valid identifier
bash: export: `Files/Microsoft': not a valid identifier
bash: export: `Server/100/DTS/Binn:/c/Program': not a valid identifier
bash: export: `Files/Microsoft': not a valid identifier
bash: export: `Server/100/Tools/Binn/VSShell/Common7/IDE:/c/Program': not a valid identifier
bash: export: `Files/Microsoft': not a valid identifier
bash: export: `9.0/Common7/IDE/PrivateAssemblies:%USERPROFILE%/.dnx/bin:/c/Program': not a valid identifier
bash: export: `Files/Microsoft': not a valid identifier
bash: export: `DNX/Dnvm:/c/Program': not a valid identifier
bash: export: `Files/nodejs:/c/Users/dell/AppData/Roaming/npm:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin': not a valid identifier



Getting this error when open git bash, in windows 7

After that when run any command like grunt or npm i got error

bash: npm: command not found



my export variables are as following

Quote:

dell@dell-PC MINGW32 /d/ProacDoc
$ export
declare -x !::
declare -x ACLOCAL_PATH="/mingw32/share/aclocal:/usr/share/aclocal"
declare -x ALLUSERSPROFILE="C:\\ProgramData"
declare -x APPDATA="C:\\Users\\dell\\AppData\\Roaming"
declare -x COMMONPROGRAMFILES="C:\\Program Files\\Common Files"
declare -x COMPUTERNAME="DELL-PC"
declare -x COMSPEC="C:\\Windows\\system32\\cmd.exe"
declare -x DISPLAY="needs-to-be-defined"
declare -x EXEPATH="C:\\Program Files\\Git"
declare -x FP_NO_HOST_CHECK="NO"
declare -x HOME="/c/Users/dell"
declare -x HOMEDRIVE="C:"
declare -x HOMEPATH="\\Users\\dell"
declare -x HOSTNAME="dell-PC"
declare -x INFOPATH="/usr/local/info:/usr/share/info:/usr/info:/share/info:"
declare -x LANG="en_US.UTF-8"
declare -x LOCALAPPDATA="C:\\Users\\dell\\AppData\\Local"
declare -x LOGONSERVER="\\\\DELL-PC"
declare -x MANPATH="/mingw32/share/man:/usr/local/man:/usr/share/man:/usr/man:/s hare/man:"
declare -x MSYSTEM="MINGW32"
declare -x NUMBER_OF_PROCESSORS="4"
declare -x OLDPWD
declare -x OS="Windows_NT"
declare -x PATH="/c/Users/dell/bin:/mingw32/bin:/usr/local/bin:/usr/bin:/bin:/mi ngw32/bin:/usr/bin:/c/Users/dell/bin:/c/Windows/system32:/c/Windows:/c/Windows/S ystem32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program"
declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
declare -x PKG_CONFIG_PATH="/mingw32/lib/pkgconfig:/mingw32/share/pkgconfig"
declare -x PLINK_PROTOCOL="ssh"
declare -x PRINTER="Send To OneNote 2007"
declare -x PROCESSOR_ARCHITECTURE="x86"
declare -x PROCESSOR_IDENTIFIER="x86 Family 6 Model 42 Stepping 7, GenuineIntel"
declare -x PROCESSOR_LEVEL="6"
declare -x PROCESSOR_REVISION="2a07"
declare -x PROGRAMFILES="C:\\Program Files"
declare -x PS1="\\[\\033]0;\$TITLEPREFIX:\${PWD//[^[:ascii:]]/?}\\007\\]\\n\\[\\ 033[32m\\]\\u@\\h \\[\\033[35m\\]\$MSYSTEM \\[\\033[33m\\]\\w\\[\\033[36m\\]\`__ git_ps1\`\\[\\033[0m\\]\\n\$ "
declare -x PSModulePath="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules \\"
declare -x PUBLIC="C:\\Users\\Public"
declare -x PWD="/d/ProacDoc"
declare -x ProgramData="C:\\ProgramData"
declare -x SESSIONNAME="Console"
declare -x SHELL="/usr/bin/bash"
declare -x SHLVL="1"
declare -x SQL
declare -x SSH_ASKPASS="/mingw32/libexec/git-core/git-gui--askpass"
declare -x SYSTEMDRIVE="C:"
declare -x SYSTEMROOT="C:\\Windows"
declare -x Studio
declare -x TEMP="/tmp"
declare -x TERM="xterm"
declare -x TMP="/tmp"



What I have tried:

I have googled about it and tried by solutions like setting environment variables, export PATH and reinstall nodejs and gitbash some other

解决方案

export
declare -x !::
declare -x ACLOCAL_PATH="/mingw32/share/aclocal:/usr/share/aclocal"
declare -x ALLUSERSPROFILE="C:\\ProgramData"
declare -x APPDATA="C:\\Users\\dell\\AppData\\Roaming"
declare -x COMMONPROGRAMFILES="C:\\Program Files\\Common Files"
declare -x COMPUTERNAME="DELL-PC"
declare -x COMSPEC="C:\\Windows\\system32\\cmd.exe"
declare -x DISPLAY="needs-to-be-defined"
declare -x EXEPATH="C:\\Program Files\\Git"
declare -x FP_NO_HOST_CHECK="NO"
declare -x HOME="/c/Users/dell"
declare -x HOMEDRIVE="C:"
declare -x HOMEPATH="\\Users\\dell"
declare -x HOSTNAME="dell-PC"
declare -x INFOPATH="/usr/local/info:/usr/share/info:/usr/info:/share/info:"
declare -x LANG="en_US.UTF-8"
declare -x LOCALAPPDATA="C:\\Users\\dell\\AppData\\Local"
declare -x LOGONSERVER="\\\\DELL-PC"
declare -x MANPATH="/mingw32/share/man:/usr/local/man:/usr/share/man:/usr/man:/s hare/man:"
declare -x MSYSTEM="MINGW32"
declare -x NUMBER_OF_PROCESSORS="4"
declare -x OLDPWD
declare -x OS="Windows_NT"
declare -x PATH="/c/Users/dell/bin:/mingw32/bin:/usr/local/bin:/usr/bin:/bin:/mi ngw32/bin:/usr/bin:/c/Users/dell/bin:/c/Windows/system32:/c/Windows:/c/Windows/S ystem32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program"
declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
declare -x PKG_CONFIG_PATH="/mingw32/lib/pkgconfig:/mingw32/share/pkgconfig"
declare -x PLINK_PROTOCOL="ssh"
declare -x PRINTER="Send To OneNote 2007"
declare -x PROCESSOR_ARCHITECTURE="x86"
declare -x PROCESSOR_IDENTIFIER="x86 Family 6 Model 42 Stepping 7, GenuineIntel"
declare -x PROCESSOR_LEVEL="6"
declare -x PROCESSOR_REVISION="2a07"
declare -x PROGRAMFILES="C:\\Program Files"
declare -x PS1="\\[\\033]0;\


TITLEPREFIX:\


{PWD//[^[:ascii:]]/?}\\007\\]\\n\\[\\ 033[32m\\]\\u@\\h \\[\\033[35m\\]\


这篇关于“Bash:export:&quot; path”:启动git bash windows 7时不是有效的标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆