到目前为止,我已经在许多不同的平台上安装了heroku工具带,我很惊讶地发现自己在ubuntu 12.04上无法做到这一点。我认为我遇到的一些问题已经被其他StackOverflow帖子解释过了,即"sh“没有运行任何东西,但奇怪的是--force-yes应该是必需的,而且在Heroku的脚本中没有-我还发布了Heroku自己的一张罚单。
运行指定的命令导致没有明显的活动:
saasbook@saasbook:~/Documents/Github/ruby-sample$ wget -qo- https://toolbelt.heroku.com/install-ubuntu.sh | sh saasbook@saasbook:~/Documents/Github/ruby-sample$
通过尝试,我最终能够抓取脚本:
saasbook@saasbook:~/Documents/Github/ruby-sample$ wget --no-check-certificate http://toolbelt.heroku.com/install-ubuntu.sh | sh --2013-10-10 12:50:32-- http://toolbelt.heroku.com/install-ubuntu.sh Resolving toolbelt.heroku.com... 174.129.17.173, 54.243.76.97, 23.21.198.2 Connecting to toolbelt.heroku.com|174.129.17.173|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://toolbelt.heroku.com/install-ubuntu.sh [following] --2013-10-10 12:50:33-- https://toolbelt.heroku.com/install-ubuntu.sh Connecting to toolbelt.heroku.com|174.129.17.173|:443... connected. WARNING: certificate common namewww.heroku.com‘与toolbelt.heroku.com'. HTTP request sent, awaiting response... 200 OK Length: 572 [text/plain] Saving to:install-ubuntu.sh.1请求的主机名不匹配’
100%======================================> 572 --.-以0为单位的K/s
2013-10-10 12:50:33 (60.1 MB/s) - install-ubuntu.sh.1' saved [572/572]
然而,什么都没有运行。我直接运行了脚本:
saasbook@saasbook:~/Documents/Github/ruby-sample$ ./install-ubuntu.sh This script requires superuser access to install apt packages. You will be prompted for your password by sudo. [sudo] password for saasbook: --2013-10-10 12:52:14-- https://toolbelt.heroku.com/apt/release.key Resolving toolbelt.heroku.com... 174.129.17.173, 54.243.76.97, 23.21.198.2 Connecting to toolbelt.heroku.com|174.129.17.173|:443... connected. ERROR: certificate common namewww.heroku.com‘与请求的主机名'toolbelt.heroku.com’不匹配。要不安全地连接到证书,请使用‘--no-check- toolbelt.heroku.com’。gpg:未找到有效的OpenPGP数据。Ign http://ppa.launchpad.net oneiric InRelease命中http://ppa.launchpad.net oneiric Release.gpg
命中http://ppa.launchpad.net oneiric版本
Ign http://extras.ubuntu.com oneiric
获取:1 http://extras.ubuntu.com oneiric Release.gpg 72 B
命中http://extras.ubuntu.com oneiric版本
Hit http://ppa.launchpad.net oneiric/main源
Ign http://us.archive.ubuntu.com oneiric
点击http://ppa.launchpad.net oneiric/main i386包
Ign http://ppa.launchpad.net单核/主TranslationIndex
Hit http://extras.ubuntu.com oneiric/main源
点击http://extras.ubuntu.com oneiric/main i386包
Ign http://extras.ubuntu.com单核/主TranslationIndex
点击http://us.archive.ubuntu.com oneiric Release.gpg
Ign http://ppa.launchpad.net原文/主文翻译-简体中文
命中http://us.archive.ubuntu.com oneiric版本
Ign http://ppa.launchpad.net单源/主翻译-en
Ign http://extras.ubuntu.com原文/主文翻译-简体中文
Ign http://extras.ubuntu.com单源/主翻译-en
Ign http://toolbelt.heroku.com。/ InRelease
点击http://us.archive.ubuntu.com oneiric/主源点击http://us.archive.ubuntu.com oneiric/受限源点击http://us.archive.ubuntu.com oneiric/限制源点击http://us.archive.ubuntu.com oneiric/multiverse源点击http://us.archive.ubuntu.com oneiric/主i386包点击http://us.archive.ubuntu.com oneiric/受限i386包点击http://us.archive.ubuntu.com oneiric/multiverse i386包点击http://us.archive.ubuntu.com oneiric/multiverse i386包点击http://us.archive.ubuntu.com oneiric/main TranslationIndex点击http://us.archive.ubuntu.com oneiric/multiverse TranslationIndex点击http://us.archive.ubuntu.com oneiric/受限TranslationIndex点击http://us.archive.ubuntu.com oneiric/universe点击http://us.archive.ubuntu.com oneiric/main翻译-en点击http://us.archive.ubuntu.com oneiric/multiverse命中http://us.archive.ubuntu.com唯一/受限翻译-en命中http://us.archive.ubuntu.com唯一/全局翻译-en Get:2 http://toolbelt.heroku.com。/ Release.gpg 490 B Get:3 http://toolbelt.heroku.com。/ Release 1,673 B
Ign http://toolbelt.heroku.com。/ Release
获取:4个http://toolbelt.heroku.com。/包1,041 B
Ign http://toolbelt.heroku.com ./ Translation en_US
Ign http://toolbelt.heroku.com ./翻译-en
在8秒内获取了3,276 B (367 B/s)
正在读取包列表...完成W: GPG错误:http://toolbelt.heroku.com。/ Release:无法验证以下签名,因为公钥不可用: NO_PUBKEY C927EBE00F1B0520正在读取包列表...依赖关系树构建完成
正在读取状态信息...完成以下额外的软件包将被安装: foreman heroku libreadline5 libruby1.9.1 ruby1.9.1建议的软件包: ruby1.9.1-examples ri1.9.1 ruby1.9.1-dev以下新的软件包将被安装: foreman heroku heroku- libreadline5 libruby1.9.1 ruby1.9.1升级,6新安装,0删除,0不升级。需要获取4,844 kB的档案。执行此操作后,将使用15.9 MB的额外磁盘空间。警告:无法对以下包进行身份验证!工头heroku heroku -工具带E:有问题,使用-y时没有--强制-是的foreman登录heroku:没有找到命令`
但问题是缺少--武力--是的
我终于能够通过运行这个额外的命令来安装:
saasbook@saasbook:~/Documents/Github/ruby-sample$ sudo apt-get install -y heroku-toolbelt Reading package lists... Done Building dependency tree
Reading state information... Done The following extra packages will be installed: foreman heroku libreadline5 libruby1.9.1 ruby1.9.1 Suggested packages: ruby1.9.1-examples ri1.9.1 ruby1.9.1-dev The following NEW packages will be installed: foreman heroku heroku-toolbelt libreadline5 libruby1.9.1 ruby1.9.1 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. Need to get 4,844 kB of archives. After this operation, 15.9 MB of additional disk space will be used. WARNING: The following packages cannot be authenticated! foreman heroku heroku-toolbelt E: There are problems and -y was used without --force-yes saasbook@saasbook:~/Documents/Github/ruby-sample$ which heroku saasbook@saasbook:~/Documents/Github/ruby-sample$ sudo apt-get install -y --force-yes heroku-toolbelt Reading package lists... Done Building dependency tree
Reading state information... Done The following extra packages will be installed: foreman heroku libreadline5 libruby1.9.1 ruby1.9.1 Suggested packages: ruby1.9.1-examples ri1.9.1 ruby1.9.1-dev The following NEW packages will be installed: foreman heroku heroku-toolbelt libreadline5 libruby1.9.1 ruby1.9.1 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. Need to get 4,844 kB of archives. After this operation, 15.9 MB of additional disk space will be used. WARNING: The following packages cannot be authenticated! foreman heroku heroku-toolbelt Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/main libreadline5 i386 5.2-9ubuntu1 [123 kB] Get:2 http://us.archive.ubuntu.com/ubuntu/ oneiric/universe libruby1.9.1 i386 1.9.2.290-2 [3,929 kB] Get:3 http://toolbelt.heroku.com/ubuntu/ ./ foreman 0.60.0 [89.5 kB] Get:4 http://us.archive.ubuntu.com/ubuntu/ oneiric/universe ruby1.9.1 i386 1.9.2.290-2 [36.5 kB] Get:5 http://toolbelt.heroku.com/ubuntu/ ./ heroku 3.0.0 [665 kB] Get:6 http://toolbelt.heroku.com/ubuntu/ ./ heroku-toolbelt 3.0.0 [626 B] Fetched 4,844 kB in 4s (997 kB/s)
Selecting previously deselected package libreadline5. (Reading database ... 134658 files and directories currently installed.) Unpacking libreadline5 (from .../libreadline5_5.2-9ubuntu1_i386.deb) ... Selecting previously deselected package libruby1.9.1. Unpacking libruby1.9.1 (from .../libruby1.9.1_1.9.2.290-2_i386.deb) ... Selecting previously deselected package ruby1.9.1. Unpacking ruby1.9.1 (from .../ruby1.9.1_1.9.2.290-2_i386.deb) ... Selecting previously deselected package foreman. Unpacking foreman (from .../foreman_0.60.0_all.deb) ... Selecting previously deselected package heroku. Unpacking heroku (from .../archives/heroku_3.0.0_all.deb) ... Selecting previously deselected package heroku-toolbelt. Unpacking heroku-toolbelt (from .../heroku-toolbelt_3.0.0_all.deb) ... Processing triggers for man-db ... Setting up libreadline5 (5.2-9ubuntu1) ... Setting up libruby1.9.1 (1.9.2.290-2) ... Setting up ruby1.9.1 (1.9.2.290-2) ... update-alternatives: using /usr/bin/gem1.9.1 to provide /usr/bin/gem (gem) in auto mode. update-alternatives: using /usr/bin/ruby1.9.1 to provide /usr/bin/ruby (ruby) in auto mode. Setting up foreman (0.60.0) ... Setting up heroku (3.0.0) ... Setting up heroku-toolbelt (3.0.0) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place saasbook@saasbook:~/Documents/Github/ruby-sample$ heroku login Enter your Heroku credentials.
我认为我的设置有些奇怪,因为这在过去总是非常顺利的。我的系统或脚本是否有一些简单的更改,可以帮助其他人避免这个问题?
发布于 2014-01-07 18:51:03
我也面临着完全相同的问题。我做了一个猜测,并尝试用sudo安装它,它起作用了!
改用下面的代码:
sudo wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh发布于 2017-02-28 00:47:35
我也遇到了同样的问题,我通过在/etc/apt/soures.list和/etc/apt/soures.list.d/heroku.list中注释heroku相关行来修复它
然后我再次运行脚本,它起作用了:
sudo wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh如果您在软件源文件中同时配置了以下内容,则可能会发生这种情况:
deb http://toolbelt.heroku.com/ubuntu ./和:
deb https://cli-assets.heroku.com/branches/stable/apt ./https://stackoverflow.com/questions/19316668
复制相似问题