到目前为止,我已经在许多不同的平台上安装了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 name
www.heroku.com'与请求的主机名toolbelt.heroku.com'.
HTTP request sent, awaiting response... 200 OK
Length: 572 [text/plain]
Saving to:
install-ubuntu.sh.1'不匹配
100%[======================================>] 572 - 。-K / s in 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数据。
点击http://ppa.launchpad.net oneiric InRelease
点击http://ppa.launchpad.net oneiric Release.gpg
点击http://ppa.launchpad.net oneiric Release
点击http://extras.ubuntu.com oneiric InRelease
得到:1 http://extras.ubuntu.com oneiric Release.gpg [72 B]
点击http://extras.ubuntu.com oneiric Release
点击http://ppa.launchpad.net oneiric / main来源
点击http://us.archive.ubuntu.com oneiric InRelease
点击http://ppa.launchpad.net oneiric / main i386包
点击http://ppa.launchpad.net oneiric / main TranslationIndex
点击http://extras.ubuntu.com oneiric / main来源
点击http://extras.ubuntu.com oneiric / main i386包
点击http://extras.ubuntu.com oneiric / main TranslationIndex
点击http://us.archive.ubuntu.com oneiric Release.gpg
点击http://ppa.launchpad.net oneiric / main翻译en_US
点击http://us.archive.ubuntu.com oneiric Release
点击http://ppa.launchpad.net oneiric / main翻译en
点击http://extras.ubuntu.com oneiric / main翻译en_US
点击http://extras.ubuntu.com oneiric / main翻译en
点击http://toolbelt.heroku.com ./ InRelease
点击http://us.archive.ubuntu.com oneiric / main来源
点击http://us.archive.ubuntu.com oneiric / restricted Sources
点击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翻译en
点击http://us.archive.ubuntu.com oneiric / multiverse Translation-en
点击http://us.archive.ubuntu.com oneiric / restricted Translation-en
点击http://us.archive.ubuntu.com oneiric / universe Translation-en
获取:2 http://toolbelt.heroku.com ./ Release.gpg [490 B]
获得:3 http://toolbelt.heroku.com ./发布[1,673 B]
忽略http://toolbelt.heroku.com ./释放
获取:4 http://toolbelt.heroku.com ./ Packages [1,041 B]
点击http://toolbelt.heroku.com ./ Translation-en_US
点击http://toolbelt.heroku.com ./ Translation-en
获得3,276 B,8s(367 B / s)
阅读包裹清单......完成
W:GPG错误: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登录
heroku:命令未找到`
但缺少-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.
我认为我的设置有些奇怪,因为这在过去总是非常顺利。是否可能对我的系统或脚本进行一些简单的更改,以帮助其他人避免此问题?
答案 0 :(得分:2)
我正面临着同样的问题。我做了一个猜测,尝试用sudo安装它,它工作!!
请改用:
sudo wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
答案 1 :(得分:0)
我有同样的问题,我通过在/etc/apt/sources.list和/etc/apt/sources.list.d/heroku.list
中评论heroku相关行来修复它然后我再次重新运行脚本,它起作用了:
sudo wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
如果您在软件源文件中同时配置了以下内容,则似乎会发生这种情况:
deb http://toolbelt.heroku.com/ubuntu ./
AND:
deb https://cli-assets.heroku.com/branches/stable/apt ./