简体   繁体   English

我可以在 Centos 7 上安装 node.js 18 吗?我是否也需要安装 python 3?

[英]Can I install node.js 18 on Centos 7 and do I need python 3 install too?

I'm not sure if node.js 18 supports centos 7 and is it a requirement to install python 3 for node.js 18?我不确定 node.js 18 是否支持 centos 7,是否需要为 node.js 18 安装 python 3?

Step 1 - curl --silent --location https://rpm.nodesource.com/setup_18.x | sudo bash -第 1 步 - curl --silent --location https://rpm.nodesource.com/setup_18.x | sudo bash - curl --silent --location https://rpm.nodesource.com/setup_18.x | sudo bash -

Step 2 - sudo yum -y install nodejs第 2 步 - sudo yum -y install nodejs

I don't think you need Python 3.我认为您不需要 Python 3。

Reference - https://computingforgeeks.com/install-node-js-on-centos-rhel-rocky-linux/参考 - https://computingforgeeks.com/install-node-js-on-centos-rhel-rocky-linux/

I am sure you can install NodeJS 18 on Centos7.我相信你可以在 Centos7 上安装 NodeJS 18。

Regarding of the Python need.关于 Python 的需求。 Yes you will need python installed, NodeJS use some python code.是的,你需要安装 python,NodeJS 使用一些 python 代码。 Python is required for building node from source从源代码构建节点需要 Python

Starting v18, Node.js no longer supports centos 7 and a few other Linux distros due to glibc version incompatibility.从 v18 开始,由于 glibc 版本不兼容,Node.js 不再支持 centos 7 和其他一些 Linux 发行版。 See https://github.com/nodejs/node/issues/43246 .请参阅https://github.com/nodejs/node/issues/43246

getting error出现错误

    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * epel: mirror.sabay.com.kh
    Resolving Dependencies
    --> Running transaction check
    ---> Package nodejs.x86_64 1:16.18.1-3.el7 will be updated
    ---> Package nodejs.x86_64 2:18.14.0-1nodesource will be an update
    --> Processing Dependency: libc.so.6(GLIBC_2.28)(64bit) for package:     2:nodejs-18.14.0-1nodesource.x86_64
    --> Processing Dependency: libm.so.6(GLIBC_2.27)(64bit) for package: 2:nodejs-18.14.0-1nodesource.x86_64
    --> Finished Dependency Resolution
    Error: Package: 2:nodejs-18.14.0-1nodesource.x86_64 (nodesource)
           Requires: libc.so.6(GLIBC_2.28)(64bit)
    Error: Package: 2:nodejs-18.14.0-1nodesource.x86_64 (nodesource)
           Requires: libm.so.6(GLIBC_2.27)(64bit)
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM