如何解决无法在Cloud9 IDE上启动Heroku
我正在运行命令-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,...
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。请告知进度。
感谢您的时间和帮助。
解决方法
我有一个专要用于在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基本上是您必须使用最新版本的地方,否则您将遇到问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。