如何在 Plesk Obsidian 上添加/升级 node.js。

huangapple go评论89阅读模式
英文:

How to add/upgrade node.js on Plesk Obsidian

问题

我尝试在Plesk Obsidian中更新node.js。我只能找到旧的教程,这些教程在Obsidian中已不再适用。Plesk支持也提供了有限的帮助。我成功通过SSH安装了node.js v20并将其复制到目录opt/plesk/node/20

现在的指令要求我执行以下命令:
plesk sbin nodemng register /opt/plesk/node/20/bin/node

但是会出现以下错误消息:
未知的Plesk命令行工具: "nodemng"

然而,另一个命令plesk ext nodejs --install -version v20.0.0 也会导致错误消息。具体是:未找到Node.js版本 "v20.0.0plesk"

我已经没有更多的想法,不知道还能做什么来将node.js从16.4升级到v20。你有什么建议吗?

英文:

I have tried to update node.js in Plesk Obsidian.
I can only find older tutorials that no longer work with Obsidian. The Plesk Support has also provided limited assistance. I was able to install node.js v20 via SSH and copy it to the directory
opt/plesk/node/20

The instructions now say that I should execute the following command:

plesk sbin nodemng register /opt/plesk/node/20/bin/node

This is met with the following error message:
Unknown Plesk command-line utility: "nodemng"
However, another command plesk ext nodejs --install -version v20.0.0
would also result in an error message. Namely: The Node.js version "v20.0.0plesk" was not found.

I'm running out of ideas and I don't know what else I could do to upgrade node.js from 16.4 to v20. Do you have any suggestions?

答案1

得分: 1

我现在已经尝试了很多建议,但直到今天,我仍然无法安装 Node.js v18 或 20。
我找到了一篇有趣的文章,解释了为什么这是不可能的。

https://github.com/nodejs/node/issues/43246

在那里,以下内容被提到:

> 放弃支持 CentOS/RHEL 7 的一个很好的理由是 glibc。CentOS 7 使用 glibc 2.17,但 Node.js 的依赖项正在迁移到更新的版本。

因此,新版本的 Node.js 不受支持,直到 CentOs 更新 GLIBC 到 2.27。Ubuntu 18.04 使用 glibc 2.27。

目前,我们必须等待 CentOs 更新或找到其他解决方法。

希望其他人也需要这些信息,这样他们就可以在这里停止搜索。如果有新的信息,我会更新这个答案。

英文:

I have now tried many suggestions, but until today, I have not been able to install Node.js v18 or 20.
I have found an interesting article that explains why it is not possible.

https://github.com/nodejs/node/issues/43246

There, the following is being said:

> One good reason for dropping support for CentOS/RHEL 7 is glibc. CentOS 7 ships with glibc 2.17 but node's dependencies are moving to newer versions.

Thatswhy newer versions of node are not supported until CentOs update GLIBC to 2.27.
Ubuntu 18.04 ships with glibc 2.27.

For now we have to wait until CentOs is updated or another workaround was found.

I hope some others need this information as helpful, so they can stop searching here. I will update this answer if there is anything new.

答案2

得分: 0

以下是您要翻译的内容:

似乎在 Plesk Obsidian 中删除了 nodemng 实用程序,尽管在 Onyx 文档中也没有提及它。

此外,nodejs 扩展不提供安装新 NodeJS 版本的功能,只能管理现有版本。请查看文档以获取支持的参数信息。

最后,在这个问题中提到:

Node.js 扩展现在会自动安装和更新受支持的 LTS 版本。

所以我猜我们需要等到 NodeJS v20 获得 LTS 状态。

英文:

It seems that the nodemng utility was removed from Plesk Obsidian although it is not referenced in the documentation for Onyx either.

Additionally, the nodejs extension does not offer functionality to install new NodeJS versions but only to manage the existing ones. Check the documentation for the supported arguments.

Finally, in this question is mentioned that:

> The Node.js extension now automatically installs and updates supported LTS versions.

So I guess we will have to wait until NodeJS v20 gains LTS status.

huangapple
  • 本文由 发表于 2023年5月25日 23:39:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76334058.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定