代码之家  ›  专栏  ›  技术社区  ›  Marcelo Vital

无法在Raspbian上安装Heroku CLI

  •  3
  • Marcelo Vital  · 技术社区  · 7 年前

    我刚刚开始使用我的RP3作为开发工具,一切都很好:Python 3.6,创建了venv,安装了posgresql,与Django一起工作。一切都很好。除此之外,如果我想使用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版本,ARM是RPI的体系结构。

    2 回复  |  直到 7 年前
        1
  •  2
  •   Martin    7 年前

    您可以安装独立的heroku toolbelt for linux arm,如下所述: https://devcenter.heroku.com/articles/getting-started-with-php#set-up

    # 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
    

    $ heroku --version
    heroku-cli/5.7.1-c574890 (linux-arm) go1.7.5
    
        2
  •  0
  •   Community Egal    4 年前

    根据Heroku的支持,目前(2017年7月)没有官方支持,snap是未来的一种选择。他们声称有些人用npm做到了这一点,我也尝试了,但没有成功。

    他们的回应:

    here 公开时)。