nodestatus icon indicating copy to clipboard operation
nodestatus copied to clipboard

来个安装图文教材吧

Open 110560 opened this issue 3 years ago • 8 comments

curl -fsSL https://deb.nodesource.com/setup_16.x | bash - apt-get install -y nodejs报错

E/usr/bin/apt-get: /usr/bin/apt-get: cannot execute binary file : Command line option 'S' [from -fsSL] is not understood in combination with the other options.

110560 avatar Oct 06 '21 14:10 110560

su root 用 root 安装 nodejs 试试?

cokemine avatar Oct 06 '21 14:10 cokemine

-debian:~# curl -fsSL https://deb.nodesource.com/setup_16.x | bash - apt-get install -y nodejs /usr/bin/apt-get: /usr/bin/apt-get: cannot execute binary file curl: (23) Failed writing body (98 != 1375)

110560 avatar Oct 06 '21 14:10 110560

@110560 🤔我觉得可能是软件源配置有问题,检查一下sources.list正不正常

cokemine avatar Oct 06 '21 15:10 cokemine

没问题 我测了

110560 avatar Oct 06 '21 17:10 110560

deb http://deb.debian.org/debian/ buster main deb-src http://deb.debian.org/debian/ buster main

deb http://security.debian.org/debian-security buster/updates main deb-src http://security.debian.org/debian-security buster/updates main

buster-updates, previously known as 'volatile'

deb http://deb.debian.org/debian/ buster-updates main deb-src http://deb.debian.org/debian/ buster-updates main

110560 avatar Oct 06 '21 17:10 110560

@110560 因为这个 Node.js 安装方式是 NodeSource 提供的。你可以试试用它 文档写的手动通过它的源安装(而不是脚本自动配置软件源) https://github.com/nodesource/distributions 也可以不通过 NodeSource 直接下载二进制文件或是 nvm安装 https://github.com/nvm-sh/nvm

cokemine avatar Oct 07 '21 05:10 cokemine

已经不会了 等个大佬写图文。。。 我只会看中文

110560 avatar Oct 07 '21 06:10 110560

@110560 这个就是安装个运行时...如果你用的archlinux 直接 pacman -S nodejs安装的也是最新版本的 node... 还是建议直接用 Docker 吧。还能隔离一下环境

cokemine avatar Oct 09 '21 05:10 cokemine