我刚刚尝试在 Linux 上安装 Flutter,当我尝试运行颤振命令(颤振医生)时,我得到了
Error: Unable to find git in your PATH.
我该如何解决这个问题?
我刚刚尝试在 Linux 上安装 Flutter,当我尝试运行颤振命令(颤振医生)时,我得到了
Error: Unable to find git in your PATH.
我该如何解决这个问题?
使用以下命令安装它。
sudo apt-get install git
添加
C:\Program Files\Git\bin\git.exe;C:\Program Files\Git\cmd;C:\Windows\System32
到您的 PATH 变量
不要为 git 创建新变量,而是像我一样添加它们,用 ; 分隔它们。
只需添加C:\Windows\System32
到您的系统变量PATH。有用
我也遇到了同样的问题,因为我的系统没有安装 git。所以我从https://git-scm.com/downloads下载了 git并安装了它,安装后它就可以工作了。
我在 Windows 10 上遇到了同样的问题。我已经尝试了所有方法,但以管理员身份运行 cmd解决了我的问题。
您可以下载 64 位 Git for Windows Setup https://git-scm.com/download/win
对于 WINDOWS:如果您在 git 安装期间选择了 Visual Studio 代码并且在 Windows 上有多个用户帐户,那么您需要做的就是卸载 git 并重新安装 git,选择 vim 作为默认编辑器而不是 Visual Studio 代码。在 git 安装期间选择 Visual Studio 代码时也会收到警告。注意这一点。对我来说,将 Visual Studio 代码设置为默认值并拥有多个用户帐户是问题所在。
卸载并重新安装GIT 解决了我的问题。
添加路径后: C:\src\flutter\bin C:\Windows\System32 C:\Windows\System32\WindowsPowerShell\v1.0 C:\Program Files\Git\bin\git.exe C:\Program Files\Git \cmd 尝试使用 windows powershell (admin),它对我有用
在 Windows 10 C:\src\flutter\bin C:\Windows\System32 C:\Windows\System32\WindowsPowerShell\v1.0 C:\Program Files\Git\bin\git.exe C:\Program Files\Git\命令
尝试根据您的 linux 发行版 https://git-scm.com/download/linux从此处安装 git
只要让你的路径像这样,它就可以了
C:\Windows\System32;C:\Users\HP\flutter\bin
C:\src\flutter\bin;C:\Windows\System32
只需添加此路径