2017-07-19 92 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)。

感謝您伸出援手!