heroku 命令在 raspbian 上失败

heroku command fails on raspbian

我将 heroku-toolbelt 安装到 raspbian。 但是 heroku 命令失败了。

heroku-toolbelt 安装:

$ wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh

heroku 命令失败

$ heroku login
Illegal instruction
 !    error getting commands pid 6630 exit 132

$ uname -a
Linux raspberrypi 3.12.22+ #691 PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l GNU/Linux
$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [arm-linux-eabihf]

你描述了一种情况,但实际上并没有提出问题。我将您 post 中的问题解释为 "Why does the heroku command exit with 'illegal instruction' error?"。

官方 debian "armhf" 端口针对 ARMv7 架构(c.f。https://wiki.debian.org/ArmHardFloatPort#Supported_devices "Currently the Debian armhf port requires at least an ARMv7 CPU with Thumb-2 and VFP3D16.")。

第一个 Raspberry Pi 有一个 ARMv6 CPU。 Raspberry Pi 基金会和后来的 Raspbian 创建者从源代码为 ARMv6 CPU.

重新编译了所有 debian 软件包

但他们决定保留相同的 "armhf" 名称。可能是因为在 debian 构建系统中引入新名称更加努力。

只要您不混合软件包存储库,这就可以正常工作。 Raspbian 安装的 /etc/apt/sources.list 文件指向 Raspberry Pi 特定的软件包下载服务器,在为 ARMv6 编译的 "armhf" 名称二进制文件下提供服务。

如果您尝试为常规 debian 发行版安装 armhf 软件包,一旦要求 CPU 执行不属于 ARMv6 的 ARMv7 指令,您就会看到此非法指令错误。

为"armhf"的规范意义编译的第三方armhf包也是如此,比如这个heroku toolbelt。

这是一个老问题,但也许对其他人有帮助: 您可以像此处描述的那样为 linux arm 安装独立的 heroku toolbelt:https://devcenter.heroku.com/articles/getting-started-with-php#set-up (select "Download standalone version of the 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