迄今为止,我已经在许多不同的平台上安装了 heroku toolbelt,并且惊讶地发现自己在 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 name
toolbelt.heroku.com'.
HTTP request sent, awaiting response... 200 OK
Length: 572 [text/plain]
Saving to:
www.heroku.com' 与请求的主机名install-ubuntu.sh.1'不匹配
100%[=======================================>] 572 --.-K/ s 在 0s
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 name
www.heroku.com' 与请求的主机名 'toolbelt.heroku.com' 不匹配。要不安全地连接到 toolbelt.heroku.com,请使用“--no-check-certificate”。gpg: 没有找到有效的 OpenPGP 数据。Ign http://ppa.launchpad.net oneiric InRelease Hit http://ppa.launchpad.net oneiric Release.gpg
Hit http://ppa.launchpad.net oneiric Release
Ign http://extras.ubuntu.com oneiric InRelease
获取:1 http://extras.ubuntu.com oneiric Release.gpg [72 B]
Hit http://extras.ubuntu.com oneiric Release
Hit http://ppa.launchpad.net oneiric/main Sources
Ign http:// /us.archive.ubuntu.comoneiric InRelease
Hit http://ppa.launchpad.net oneiric/main i386 Packages
Ign http://ppa.launchpad.net oneiric/main TranslationIndex
Hit http://extras.ubuntu.com oneiric/main Sources
Hit http:// extras.ubuntu.com oneiric/main i386 Packages
Ign http://extras.ubuntu.com oneiric/main TranslationIndex
点击http://us.archive.ubuntu.com oneiric Release.gpg
Ign http://ppa.launchpad.net oneiric/main Translation-en_US
点击http://us.archive.ubuntu.com oneiric Release
Ign http://ppa.launchpad.netoneiric/main Translation-en
Ign http://extras.ubuntu.com oneiric/main Translation-en_US
Ign http://extras.ubuntu.com oneiric/main Translation-en
Ign http://toolbelt.heroku.com ./ InRelease
点击http://us.archive.ubuntu.com oneiric/main 来源点击http://us.archive.ubuntu.com oneiric/restricted 来源点击http://us.archive.ubuntu.com oneiric/universe 来源点击http://us.archive.ubuntu.com oneiric/multiverse 来源命中http://us.archive.ubuntu.com oneiric/main i386 软件包命中http://us.archive.ubuntu.com oneiric/restricted i386 软件包命中http://us.archive.ubuntu.com oneiric/universe 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/restricted TranslationIndex 点击http://us.archive.ubuntu.com oneiric/universe TranslationIndex 点击http: //us.archive.ubuntu.com oneiric/main Translation-en 点击http://us.archive.ubuntu.com oneiric/multiverse Translation-en 点击http://us.archive.ubuntu.com oneiric/restricted Translation-命中http://us.archive.ubuntu.com oneiric/universe Translation-en 获取:2 http://toolbelt.heroku.com ./ Release.gpg [490 B] 获取:3 http://toolbelt.heroku.com ./ Release [1,673 B]
Ign http://toolbelt.heroku.com ./ Release
Get:4 http://toolbelt.heroku.com ./ Packages [1,041 B]
Ign http://toolbelt.heroku.com . / Translation-en_US
Ign http://toolbelt.heroku.com ./ Translation-en
Fetched 3,276 B in 8s (367 B/s)
Reading package lists... Done W: GPG error: http://toolbelt.heroku. com./ 发布:由于公钥不可用,无法验证以下签名: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-toolbelt libreadline5 libruby1.9.1 ruby1.9.1 0 升级,6 新安装,0 删除,0 未升级。需要获得 4,844 kB 的档案。此操作后,将使用 15.9 MB 的额外磁盘空间。警告:以下软件包无法通过身份验证!工头 heroku heroku-toolbelt E: 有问题并且 -y 没有使用 --force-yes saasbook@saasbook:~/Documents/Github/ruby-sample$ heroku login heroku: command not found`
但是缺少 --force-yes 存在问题
我终于能够通过运行以下附加命令进行安装:
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.
我认为我的设置有些奇怪,因为过去一直很顺利。我的系统或脚本是否有一些简单的更改可以帮助其他人避免这个问题?