E: Unable to locate package heroku-toolbelt

别等时光非礼了梦想. 提交于 2019-12-06 10:27:49

问题


I am trying to install the Heroku Toolbelt on Linux Mint 15 Olivia (x86-64)

When i try to run the standard command for installing on Debian machines:

wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh

I get:

W: Failed to fetch http://toolbelt.heroku.com/ubuntu/./Packages 302 Moved Temporarily [IP: 23.21.198.2 80]

...

E: Unable to locate package heroku-toolbelt

I have also got the heroku.list repo in my etc/apt/sources/:

deb http://toolbelt.heroku.com/ubuntu ./

When i try to add the repo again with:

sudo apt-add-repository 'deb http://toolbelt.herokuapp.com/ubuntu ./'

I get:

Cannot add PPA: 'No JSON object could be decoded'.

And it seems i'm not the first person with this error on Mint 15 while trying to add repositories.


回答1:


I suspect this issue may indeed be temporary, but if you need the heroku toolbelt installed now, you can install the standalone client instead of the ubuntu/debian bundle.

wget -qO- https://toolbelt.heroku.com/install.sh | sh

On an Ubuntu-based distro, however, the above will likely throw some errors:

sh: 7: [[: not found
sh: 29: [[: not found
Installation complete

This is because on Ubuntu systems /bin/sh is dash, not bash. You could either get the script and modify it to use bash instead of sh (sh is called within the script, just changing sh to bash in the command above won't suffice), or, you could ignore the errors and just do what the error-ing portion of the script instructs you to do:

Add the Heroku CLI to your PATH using:

echo 'PATH="/usr/local/heroku/bin:$PATH"' >> ~/.profile

You'll need to logout/login again to register the path addition, or just execute heroku directly in the mean time:

/usr/local/heroku/bin/heroku


来源:https://stackoverflow.com/questions/19199860/e-unable-to-locate-package-heroku-toolbelt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!