laravel Heroku CLI 安装错误:“PATH 未更新,原始长度 1585 > 1024”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44301515/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 16:04:22  来源:igfitidea点击:

Heroku CLI installation error: "PATH not updated, original length 1585 > 1024"

laravelheroku

提问by Evgeniy Miroshnichenko

I use Windows 10. When I run Heroku Cli (64) installation I get error ""PATH not updated, original length 1585 > 1024". How to solve this problem?

我使用的是 Windows 10。当我运行 Heroku Cli (64) 安装时,出现错误“”PATH not updated, original length 1585 > 1024”。如何解决这个问题?

回答by selflearningcode

I got it to work on Windows 10.

我让它在 Windows 10 上工作。

I tried two things and I'm unsure which one got Heroku to work. The first thing you can try is adding it to PATH in CMD or Git Bash in this post.

我尝试了两件事,但不确定哪一件让 Heroku 工作。在这篇文章中,您可以尝试的第一件事是将其添加到 CMD 或 Git Bash中的PATH 中。

You should also try to manually add it to PATH by going to Settings->Advanced System Settings->Environment Variables and adding a system variable with name PATH and with value "C:\Program Files\Heroku\bin" or wherever you have your heroku.exe file.

您还应该尝试通过转到 Settings->Advanced System Settings->Environment Variables 并添加名称为 PATH 且值为“C:\Program Files\Heroku\bin”或任何您拥有的系统变量来手动将其添加到 PATH heroku.exe 文件。

This will manually update the PATH.

这将手动更新 PATH。

回答by Harjot

I may be too late to answer this question but I'll share what worked for me, in case some one else ran into the same issue. Basically, with time my path variable had too many variables added to it, and apparently, there is a characters limit that can be added to the PATH variable. I deleted a few variables in the PATH that I do not need anymore, and that was all!

我可能来不及回答这个问题,但我会分享对我有用的方法,以防其他人遇到同样的问题。基本上,随着时间的推移,我的路径变量添加了太多变量,显然,可以将字符限制添加到 PATH 变量中。我在 PATH 中删除了一些我不再需要的变量,仅此而已!

回答by user3402248

The Installer is trying to apply an environment variable to the Path. But there are already too many variables setup. Delete the ones that you no longer require and it should work. You could access the System Environment variables by visiting- Settings->Advanced System Settings->Environment Variables

安装程序正在尝试将环境变量应用于路径。但是已经有太多的变量设置了。删除您不再需要的那些,它应该可以工作。您可以通过访问-设置->高级系统设置->环境变量来访问系统环境变量

回答by Abhiram Natarajan

I just came across with the same problem. The solution I used is similar to selflearningcode but instead of setting a system variable which failed, I set a user variable.

我刚刚遇到了同样的问题。我使用的解决方案类似于 selflearningcode,但我没有设置失败的系统变量,而是设置了一个用户变量。

Try this after selflearningcode's answer, if you can echo %PATH%and it displays heroku you should be good to go. Else, set a user variable on the same screen by adding a new entry to the path and it should work.

在 selflearningcode 的回答之后试试这个,如果可以的话echo %PATH%,它会显示 heroku,你应该很高兴。否则,通过向路径添加新条目在同一屏幕上设置用户变量,它应该可以工作。

Note: Start a new terminal for the effects to be visible.

注意:启动一个新终端以使效果可见。

回答by brahmaji tammana

You might have to set Environment variables in Advanced System Settings. If there is already a path defined, just append your path with ;

您可能需要在高级系统设置中设置环境变量。如果已经定义了路径,只需在路径后面加上 ;

ex: Existing path(It can be anything, just as an example): C:\Program Files (x86)\Google\Chrome\Application

例如:现有路径(可以是任何东西,仅作为示例):C:\Program Files (x86)\Google\Chrome\Application

If you want to add heroku path: C:\Program Files (x86)\Google\Chrome\Application;C:\Program Files\Heroku\bin

如果要添加heroku路径:C:\Program Files (x86)\Google\Chrome\Application;C:\Program Files\Heroku\bin

Hope it works.

希望它有效。