2017-07-19 87 views
2

我刚开始使用我的RP3作为我的开发盒,并且一切工作正常:Python 3.6,创建了venv's,安装了posgresql,与Django一起工作。一切皆好。除此之外,如果我想与Heroku合作,他们的CLI(以前的Toolbelt)将不会安装,说明该软件包不存在。不能在Raspbian上安装Heroku CLI

我所做的:

他们official site指出,我们应该运行的脚本:

wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh 

这基本上似乎代表包括:Heroku的来源apt-get,更新(apt-get update),然后通过运行apt-get install heroku进行安装。完整的输出是在这里:

$ sudo wget -qO- https://cli- assets.heroku.com/install-ubuntu.sh | sh 
+ SUDO= 
+ id -u 
+ [ 1000 != 0 ] 
+ SUDO=sudo 
+ echo This script requires superuser access to install apt packages. 
This script requires superuser access to install apt packages. 
+ echo You will be prompted for your password by sudo. 
You will be prompted for your password by sudo. 
+ sudo -k 
+ sudo sh 
+ dpkg -s apt-transport-https 
+ echo deb https://cli-assets.heroku.com/branches/stable/apt ./ 
+ dpkg -s heroku-toolbelt 
+ true 
+ apt-key add - 
+ wget -qO- https://cli-assets.heroku.com/apt/release.key 
OK 
+ apt-get update 
Get:1 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB] 
Hit https://cli-assets.heroku.com ./ InRelease 
Hit https://cli-assets.heroku.com ./ Packages 
Get:2 http://mirrordirector.raspbian.org jessie/main armhf Packages [9,533 kB] 
Get:3 https://cli-assets.heroku.com ./ Translation-en_GB [364 B] 
Hit http://archive.raspberrypi.org jessie InRelease 
Get:4 https://cli-assets.heroku.com ./ Translation-en [361 B] 
Hit http://archive.raspberrypi.org jessie/main armhf Packages 
Get:5 https://cli-assets.heroku.com ./ Translation-en_GB [364 B] 
Get:6 https://cli-assets.heroku.com ./ Translation-en [361 B] 
Hit http://archive.raspberrypi.org jessie/ui armhf Packages 
Get:7 https://cli-assets.heroku.com ./ Translation-en_GB [364 B] 
Get:8 https://cli-assets.heroku.com ./ Translation-en [361 B] 
Get:9 https://cli-assets.heroku.com ./ Translation-en_GB [364 B] 
Get:10 https://cli-assets.heroku.com ./ Translation-en [361 B] 
Get:11 https://cli-assets.heroku.com ./ Translation-en_GB [364 B] 
Ign https://cli-assets.heroku.com ./ Translation-en_GB 
Get:12 https://cli-assets.heroku.com ./ Translation-en [361 B] 
Ign https://cli-assets.heroku.com ./ Translation-en 
Get:13 http://mirrordirector.raspbian.org jessie/contrib armhf Packages [43.3  kB] 
Get:14 http://mirrordirector.raspbian.org jessie/non-free armhf Packages [84.2  kB] 
Get:15 http://mirrordirector.raspbian.org jessie/rpi armhf Packages [1,356 B] 
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB 
Ign http://archive.raspberrypi.org jessie/main Translation-en 
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB 
Ign http://archive.raspberrypi.org jessie/ui Translation-en 
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB 
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en 
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB 
Ign http://mirrordirector.raspbian.org jessie/main Translation-en 
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB 
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en 
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB 
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en 
Fetched 9,677 kB in 21s (450 kB/s) 
Reading package lists... Done 
+ apt-get install -y heroku 
Reading package lists... Done 
Building dependency tree 
Reading state information... Done 
E: Unable to locate package heroku 

安装他们所谓的"Standalone" program也似乎并没有这个计划行不通,因为有建立用于x86和x64只,而不是ARM,这是RPI的架构。

有没有人成功做到这一点?我在网上发现了其他类似的问题,但没有回答!

回答

1

喜欢这里描述,您可以安装Linux的臂独立Heroku的工具区:https://devcenter.heroku.com/articles/getting-started-with-php#set-up(选择“下载Heroku的CLI的单机版”)

# Run this from your terminal. 
# Replace OS with one of “linux”, “darwin”, “windows”, “freebsd”, “openbsd” 
# Replace ARCH with one of “amd64”, “386” or “arm” 
wget https://cli-assets.heroku.com/branches/stable/heroku-OS-ARCH.tar.gz 
mkdir -p /usr/local/lib /usr/local/bin 
tar -xvzf heroku-OS-ARCH.tar.gz -C /usr/local/lib 
ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku 
# ensure that /usr/local/bin is in the PATH environment variable 

我已经在我的RP3运行与raspbian jessie

$ heroku --version 
heroku-cli/5.7.1-c574890 (linux-arm) go1.7.5 
+0

好,@Cyrus,谢谢!幸运的是,您遇到过时的说明似乎比“[官方CLI网站](https://devcenter.heroku.com/articles/heroku-cli#standalone)”更好,它指出只有x86或x64可用。我确认我可以按照这些说明进行安装,并按照您的说明安装一个非常旧的版本(5.7.1)。幸运的是,CLI具有自我更新功能,可以在几条命令后启动,现在我有: '$ heroku --version' 'heroku-cli/6.12.17-aa05cb0(linux-arm)node-v8。 1.4' –

+0

很高兴它为你工作!你说得对。我的安装也自行更新为6.12.17。 :) – Cyrus

0

根据Heroku的支持,目前没有官方的支持(2017年7月),未来可能会有一个选项。他们声称有人用npm做到这一点,我也试过没有成功。

他们的反应:

嘿马塞洛,

我们目前正在一个跨平台上安装带卡的CLI方法。当它公开可用时,我可以让你知道。有些人已经通过npm将CLI安装在手臂上,但我们并没有正式支持它。对于arm用户来说,Snap应该是一个很好的解决方案(snap会在公开时显示here)。

感谢您伸出援手!