node.js - NodeJS 12.x:AWS Greengrass 中未找到错误
问题描述
我不知道在哪里正确标记我的问题,如果我犯了错误,我很抱歉。(我是stackoverflow的新手)。
我正在尝试构建 AWS Greengrass 环境,但在安装必要的软件包时遇到了问题。
我刚刚在虚拟机中将 NodeJS 安装到我的 Ubuntu 20.04.1:
VirtualBox@VirtualBox:~$ sudo apt install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (12.19.0-deb-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 243 not upgraded.
VirtualBox@VirtualBox:~$ node --version
v12.19.0
所以,我有 NodeJS。然后我按照这些命令:
cd /greengrass/greengrass-dependency-checker-GGCv1.10.x
wget https://github.com/aws-samples/aws-greengrass-samples/raw/master/greengrass-dependency-checker-GGCv1.10.x.zip
unzip greengrass-dependency-checker-GGCv1.10.x.zip
cd greengrass-dependency-checker-GGCv1.10.x
sudo check_ggc_dependencies | more
现在它显示了这个:
----------------------------Commands and software packages--------------------------
Python 2.7 version: 2.7.18
Python 3.7 version: 3.7.9
NodeJS 12.x: Not found
Java 8: Not found
我不明白,我有 NodeJS,但为什么它说Not found
你对我有什么意见或建议吗?
如果你能回答这个我会很高兴,我花了 3 个小时搜索但仍然无法解决..
解决方案
我解决了它,我想分享我的解决方案;
我按照这里的步骤操作:https ://github.com/aws/aws-greengrass-core-sdk-js
下载 NodeJS:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
After that you find node
file under the bin
directory.
Copied the file and pasted it to the desktop. The reason is that, we are not able to paste files under the /usr/bin
directory, only root is allowed for this.
In the desktop, I changed the name of the file to nodejs12.x
And then opened a terminal in Desktop and run this command:
sudo cp nodejs12.x /usr/bin
The cp
command is for giving the root acces. Source: https://askubuntu.com/questions/921797/unable-to-paste-a-file-to-usr-folder
Now, the node
file under the bin
directory is copied under the /usr/bin
directory and named as nodejs12.x
. In the end, my problem is solved:
Python 2.7 version: 2.7.18
Python 3.7 version: 3.7.9
NodeJS version: 12.19.1
推荐阅读
- python - 为什么我的代码在 .py 文件中运行时可以工作,但在 Python 解释器中返回 SyntaxError?
- cql - cqlsh:错误:没有这样的选项:--request-timeout
- python - SyntaxError (Python Jupyter Notebook)
- regex - 在 VS Code 中查找缺少两个右括号中的一个的字段
- javascript - 从 JSON 数组中删除元素
- c++ - ">> 未找到采用 'std::ifstream' 类型的左手运算符的运算符(或没有可接受的转换)"
- python - Pygame 碰撞检测`colliderect()`
- jquery - Bootstrap 4.3.1 模态对话框是否具有类似于 jQuery UI 数据存储属性的数据属性?
- python - 使用 Python 中的 beautifulsoup 和 selenium 在 Google Scholar 中进行 Web Scraping
- audio-streaming - 无法将实时音频从麦克风流式传输到 PyAudio 中的远程端口