浏览器进入 https://toolbelt.heroku.com/install-ubuntu.sh另存到本地
#!/bin/sh{
echo "This script requires superuser access to install apt packages."
echo "You will be prompted for your password by sudo."
# clear any previous sudo permission
sudo -k # run inside sudo
sudo sh <<SCRIPT # add heroku repository to apt
echo "deb http://toolbelt.heroku.com/ubuntu ./" > /etc/apt/sources.list.d/heroku.list #将http更换为https
# install heroku's release key for package verification
wget -O- https://toolbelt.heroku.com/apt/release.key | apt-key add - # update your sources
apt-get update # install the toolbelt
apt-get install -y heroku-toolbelt #将-y换成 --force-y
SCRIPT
}
更改文件权限并执行
chmod 777 install_ubuntu.sh
./install_ubuntu.sh