我尝试按照官方网站的说明在 Ubuntu 16.04 上安装 Heroku,但执行命令后sudo apt-get update
出现以下错误:
Err:30 https://cliassets.heroku.com/branches/stable/apt ./ Packages SSL: certificate subject name (*.herokuapp.com) does not match target host name 'cliassets.heroku.com'
Ign:31 https://cliassets.heroku.com/branches/stable/apt ./ Translation-en_US
Ign:32 https://cliassets.heroku.com/branches/stable/apt ./ Translation-en
Fetched 4,351 kB in 22s (192 kB/s)
Reading package lists... Done
W: The repository 'https://cliassets.heroku.com/branches/stable/apt ./ Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://cliassets.heroku.com/branches/stable/apt/ ./ Packages SSL: certificate subject name (*.herokuapp.com) does not match target host name 'cliassets.heroku.com'
E: Some index files failed to download. They have been ignored, or old ones used instead.
我查看了其他答案和解决方案,但没有帮助。任何帮助都将不胜感激。
答案1
要在所有当前支持的 Ubuntu 版本中安装 heroku,请打开终端并输入:
sudo apt install snapd
sudo snap install heroku --classic
这将成功安装 heroku snap 包(版本 6.15,目前是最新版本),这是在 Ubuntu 上安装 Heroku CLI 的推荐方法Heroku 开发中心网站。