【问题标题】:Unable to get heroku started on cloud9 ide无法在 cloud9 ide 上启动 heroku
【发布时间】:2020-12-29 07:19:21
【问题描述】:

我正在运行命令 - curl https://cli-assets.heroku.com/install-ubuntu.sh | sh

这会引发以下错误 -

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1232  100  1232    0     0   5133      0 --:--:-- --:--:-- --:--:--  5112
This script requires superuser access to install apt packages.
You will be prompted for your password by sudo.
+ dpkg -s apt-transport-https
+ echo ''
sh: line 4: /etc/apt/sources.list.d/heroku.list: No such file or directory

我还运行了sudo snap install --classic heroku,它返回了sudo: snap: command not found

然后我运行sudo apt install snapd,它返回了以下内容-

apt: invalid flag: install
Usage: apt <apt and javac options> <source files>
where apt options include:
  -classpath <path>          Specify where to find user class files and annotation processor factories
  -cp <path>                 Specify where to find user class files and annotation processor factories
  -d <path>                  Specify where to place processor and javac generated class files
  -s <path>                  Specify where to place processor generated source files
  -source <release>          Provide source compatibility with specified release
  -version                   Version information
  -help                      Print a synopsis of standard options; use javac -help for more options
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system
  -A[key[=value]]            Options to pass to annotation processors
  -nocompile                 Do not compile source files to class files
  -print                     Print out textual representation of specified types
  -factorypath <path>        Specify where to find annotation processor factories
  -factory <class>           Name of AnnotationProcessorFactory to use; bypasses default discovery process
See javac -help for information on javac options.


warning: The apt tool and its associated API are planned to be
removed in the next major JDK release.  These features have been
superseded by javac and the standardized annotation processing API,
javax.annotation.processing and javax.lang.model.  Users are
recommended to migrate to the annotation processing features of
javac; see the javac man page for more information.

最后,我跑了wget 0- wget https://toolbelt.heroku.com/install-ubuntu.sh | sh,它返回了

--2020-09-10 18:15:53--  http://0-/
Resolving 0- (0-)... failed: Name or service not known.
wget: unable to resolve host address ‘0-’
--2020-09-10 18:15:54--  http://wget/
Resolving wget (wget)... failed: Name or service not known.
wget: unable to resolve host address ‘wget’
--2020-09-10 18:15:54--  https://toolbelt.heroku.com/install-ubuntu.sh
Resolving toolbelt.heroku.com (toolbelt.heroku.com)... 54.164.74.108, 107.23.162.152, 34.194.108.77, ...
Connecting to toolbelt.heroku.com (toolbelt.heroku.com)|54.164.74.108|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 719 [text/plain]
Saving to: ‘install-ubuntu.sh’

install-ubuntu.sh                 100%[=============================================================>]     719  --.-KB/s    in 0s      

2020-09-10 18:15:54 (105 MB/s) - ‘install-ubuntu.sh’ saved [719/719]

FINISHED --2020-09-10 18:15:54--
Total wall clock time: 0.4s
Downloaded: 1 files, 719 in 0s (105 MB/s)

然后,我运行 bash install-ubuntu.sh,它返回了 -

This script requires superuser access to install apt packages.
You will be prompted for your password by sudo.
sh: line 3: /etc/apt/sources.list.d/heroku.list: No such file or directory
sh: line 6: apt-key: command not found
--2020-09-10 18:16:51--  https://toolbelt.heroku.com/apt/release.key
Resolving toolbelt.heroku.com (toolbelt.heroku.com)... 54.145.36.98, 54.164.74.108, 107.23.162.152, ...
Connecting to toolbelt.heroku.com (toolbelt.heroku.com)|54.145.36.98|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1737 (1.7K) [application/octet-stream]
Saving to: ‘STDOUT’

-                                   0%[                                                              ]       0  --.-KB/s    in 0s      


Cannot write to ‘-’ (Success).
sh: line 9: apt-get: command not found
sh: line 12: apt-get: command not found

我正在参加有关 Upskill 的在线课程,并且正在观看视频 #125。请告知如何进行。

感谢您的时间和帮助。

【问题讨论】:

    标签: ruby heroku command-line cloud9


    【解决方案1】:

    如果你没有弄清楚...

    nvm i v8
    

    接着……

    npm install -g heroku
    

    【讨论】:

    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    【解决方案2】:

    我有一个专门用于在 Cloud9 上设置 Rails 的要点(尽管我还没有为 Rails 6 更新它)。建议您在尝试之前通读两遍。在某些情况下,您可能需要出现故障,因为具体方法取决于您是克隆现有的存储库还是构建新的应用程序。

    https://gist.github.com/MyklClason/791d6b14606bc56e72eba2995aab8e76

    你可能不需要snap

    还有对 Cloud9 有用的 bash 别名: https://gist.github.com/MyklClason/d71a39ace28b9ec9f0ad

    至于您的实际问题。 Heroku 工具带已过时,请改用它:

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

    此外,通常最好只在线查看并检查如何使用官方文档为您的操作系统安装 heroku cli(或其他任何东西)。尽管这可能不适用于较旧的设置。但是,heroku 是您基本上必须使用最新版本的东西,否则您会遇到问题。

    【讨论】:

    • 谢谢!将根据要求参考要点。我使用了您建议的命令并收到以下响应“此脚本需要超级用户访问权限才能安装 apt 软件包。sudo 将提示您输入密码。+ dpkg -s apt-transport-https + echo '' sh: 第 4 行: /etc/apt/sources.list.d/heroku.list:没有这样的文件或目录”我尝试更新超级用户,但不确定要提供什么密码。如果您对此有任何提示,请告诉我。感谢您的时间和帮助
    • 运行sudo wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh?有趣的问题。您最好针对该问题提出问题。
    猜你喜欢
    • 2018-10-16
    • 2019-04-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-08
    • 1970-01-01
    相关资源
    最近更新 更多