我正在尝试安装节点版本管理器并按照其 Github 页面上提供的安装说明进行操作。
安装结束,但现在我在command not found: nvm尝试使用时遇到错误nvm install 0.8
有人可以帮我找出为什么我收到一个错误,nvm而我已经安装了它。
在我的服务器我有0.10.25“我不需要雷亚的版本,那就是‘0.10.30’这是LTS的nodejs,但是开发商要求安装第4版,挖一点后,我发现,0.12它同样nodejs兼并了一些其他包。
没有包源0.12,我已经从.tar.gznodejs的网站下载文件,解压,但它不包含任何安装脚本,手动移动文件或创建链接不是我想要的方式,我该怎么办?
更新:
[web01]~> nodejs -v
v0.10.25
[web01]~> apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
curl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[web01]~> curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
[web01]~> apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the …Run Code Online (Sandbox Code Playgroud) 我想知道将下载的文件通过管道传输curl到sudo -E bash -以下 shell的目的是什么:
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
我正在尝试安装 nodejs 和 npm,但是它失败了。这是我的终端:
sudo apt-get install nodejs npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs : Conflicts: npm
E: Unable …Run Code Online (Sandbox Code Playgroud) 我安装nodejs了apt-get上14.04
当我做 nodejs -v
v0.10.25
Run Code Online (Sandbox Code Playgroud)
当我这样做时 node -v
node : command not found.
Run Code Online (Sandbox Code Playgroud)
所以我想别名nodejstonode
我插入了一行 ~/.bashrc
alias node=nodejs
Run Code Online (Sandbox Code Playgroud)
现在,我可以访问nodejs同node一个终端。
但是在我的项目中,我使用gruntwhichnodemon通过gruntfile.js. 现在nodemon尝试运行node而不是nodejs
所以我又遇到了同样的问题 node : command not found。
因此别名不适用于非交互式非登录 shell。
我应该在哪里为此特定目的制作别名并解决我的问题?
我想在我的 Ubuntu 14.04 上安装 node.js。但是,有两个可用的软件包:node和nodejs.
经过一番挖掘,我知道曾经有一个名为node. 它实际上是业余分组无线电节点计划。这个包后来被重命名node为ax25-node。
所以,这就留下了一个令人困惑的问题:node(current) 和nodejs?之间有什么区别?
如果不是就在我面前,我都不会相信。
所以这显然是一个老主机,我什至不是在寻找解决方案,只是告诉你我所看到的,这样下一个可怜的灵魂在谷歌上搜索这些废话就不会感到那么孤独。
docker run -ti ubuntu:22.04 /bin/bash
# apt update; apt install nodejs
...
E: Problem executing scripts DPkg::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
E: Sub-process returned an error code
root@f0bb472a2a44:/# nodejs
nodejs[2608]: ../src/node_platform.cc:61:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
1: 0x7f620e2893cc node::Abort() [/lib/x86_64-linux-gnu/libnode.so.72]
2: 0x7f620e28945b [/lib/x86_64-linux-gnu/libnode.so.72]
3: 0x7f620e30bde2 node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [/lib/x86_64-linux-gnu/libnode.so.72]
4: 0x7f620e30bf16 node::NodePlatform::NodePlatform(int, v8::TracingController*) [/lib/x86_64-linux-gnu/libnode.so.72]
5: 0x7f620e2542c8 node::InitializeOncePerProcess(int, char**) [/lib/x86_64-linux-gnu/libnode.so.72]
6: 0x7f620e2544ac node::Start(int, char**) [/lib/x86_64-linux-gnu/libnode.so.72]
7: 0x7f620d7c2d90 [/lib/x86_64-linux-gnu/libc.so.6]
8: 0x7f620d7c2e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
9: …Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 服务器上安装了一些节点可执行文件,但是每当我尝试执行它们时,什么也没有发生。我什至没有收到错误消息。我知道他们在我的道路上,因为which executable_name有效。当我执行 which -a 节点时,我得到两个输出:
/usr/sbin/node
/usr/bin/node
Run Code Online (Sandbox Code Playgroud)
我觉得这与问题有关,但我不知道该怎么做。帮助。
是的,我知道,这之前已经问过。但是当使用chris-leappa 或“官方方式”(我认为实际上是同一件事?)时,安装后你会得到这个:
~$ node --version
v0.10.36
Run Code Online (Sandbox Code Playgroud)
所以有什么问题?那么目前官网的node版本已经是0.12了。这对我来说似乎是相当大的差距。
有没有更频繁更新的ppa?
我通过以下输出ps aux | grep node:
karlm 17551 1.4 0.7 1000592 93604 pts/2 Sl 09:54 0:01 node -r babel-register -r babel-polyfill src/index.js --config=c.json
Run Code Online (Sandbox Code Playgroud)
我试着用killall node.
它不会杀死进程吗?