【问题标题】:NodeJS 12.x: Not found Error in AWS GreengrassNodeJS 12.x:AWS Greengrass 中未找到错误
【发布时间】:2020-11-16 15:58:45
【问题描述】:

我不知道在哪里正确标记我的问题,如果我犯了错误,我很抱歉。 (我是 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 个小时搜索但仍然无法解决..

【问题讨论】:

    标签: node.js greengrass aws-iot-greengrass


    【解决方案1】:

    我解决了它,我想分享我的解决方案;

    我按照这里的步骤操作: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
    

    之后你会在bin目录下找到node文件。

    复制文件并将其粘贴到桌面。原因是,我们无法在/usr/bin 目录下粘贴文件,只能使用root。

    在桌面,我把文件名改成了nodejs12.x

    然后在 Desktop 中打开一个终端并运行以下命令:

    sudo cp nodejs12.x /usr/bin
    

    cp 命令用于授予 root 访问权限。来源:https://askubuntu.com/questions/921797/unable-to-paste-a-file-to-usr-folder

    现在,将bin目录下的node文件复制到/usr/bin目录下并命名为nodejs12.x。最后,我的问题解决了:

    Python 2.7 version: 2.7.18
    Python 3.7 version: 3.7.9
    NodeJS version: 12.19.1
    

    【讨论】:

    • 为什么不只是sudo cp node nodejs12.x 而在\usr\bin
    猜你喜欢
    • 2017-10-15
    • 1970-01-01
    • 2014-10-01
    • 2021-07-07
    • 1970-01-01
    • 1970-01-01
    • 2021-04-21
    • 1970-01-01
    • 2018-03-27
    相关资源
    最近更新 更多