xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

holy shit CSDN 云容器 All In One

holy shit CSDN 云容器

https://gitcode.net/-/snippets/2447

https://blog.csdn.net/u010317382?type=collect

shit bug

https://bbs.csdn.net/topics/608979714

容器为什么一直无法安装 node.js 呀,是什么原因呢?试了好多次了,完全浪费时间呀!

开了 10 核心 CPU 都不好使,什么鬼环境呀!

$ nvm install 18.12.0
Downloading and installing node v18.12.0...
Downloading https://nodejs.org/dist/v18.12.0/node-v18.12.0-linux-x64.tar.xz...
#######                                                                                                                                   5.8%curl: (18) transfer closed with 22317628 bytes remaining to read

Binary download from https://nodejs.org/dist/v18.12.0/node-v18.12.0-linux-x64.tar.xz failed, trying source.
grep: /root/.nvm/.cache/bin/node-v18.12.0-linux-x64/node-v18.12.0-linux-x64.tar.xz: 没有那个文件或目录
Provided file to checksum does not exist.
Binary download failed, trying source.
Local cache found: ${NVM_DIR}/.cache/src/node-v18.12.0/node-v18.12.0.tar.xz
Computing checksum with sha256sum
Checksums do not match: 'bc1b7fbc585cf4f51dc0f8dfec3238e132c944343db96f6426af5c1ae50823cc' found, '73a7f01e2999eb197763ced666a6cd544ad580eaefb73e0a849603b3e804f42e' expected.
Checksum check failed!
Removing the broken local cache...
Downloading https://nodejs.org/dist/v18.12.0/node-v18.12.0.tar.xz...
##                                                                                                                                        1.5%curl: (56) OpenSSL SSL_read: 连接被对方重设, errno 104

Binary download from https://nodejs.org/dist/v18.12.0/node-v18.12.0.tar.xz failed, trying source.
grep: /root/.nvm/.cache/src/node-v18.12.0/node-v18.12.0.tar.xz: 没有那个文件或目录
Provided file to checksum does not exist.



solution

npm => cnpm

nvm 将安装镜像设置成国内镜像就行了,默认的镜像在海外,访问速度超级不稳定

在终端里执行下面的命令后再使用 nvm 安装 node 试试看。

export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node

https://bbs.csdn.net/topics/608979714

OK ✅

安装 node 和 npm 后,记得给 npm 也换成淘宝的源

npm config set registry https://registry.npm.taobao.org


https://mydev.csdn.net/product/pod

custom port / 自定义端口号

https://pod-63613a04aee4323e8878b3c5-636bde81a5590a2c92c41b66-9000.datasea.cn:3000/

端口号 9000 ❌

https://pod-63613a04aee4323e8878b3c5-636bde81a5590a2c92c41b66-9000.datasea.cn:

https://pod-63613a04aee4323e8878b3c5-636bde81a5590a2c92c41b66-3000.datasea.cn/

端口号 3000 ✅

git config

$ code .git/config

[user]
	name = xgqfrms
	email = xgqfrms@xgqfrms.xyz

https://www.cnblogs.com/xgqfrms/p/11620941.html

zsh & git alias

$ code .oh-my-zsh/plugins/git/git.plugin.zsh

alias gad='git add .'

.zshrc

plugins=(git)

source $ZSH/oh-my-zsh.sh

# 手动覆盖默认 git alias 
alias gad='git add .'
alias gcm='git commit -m'
alias gp='git pull'
alias gps='git push'
# alias gps='git push -u origin master'

# source ~/.zshrc

image

refs



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-11-05 23:27  xgqfrms  阅读(83)  评论(9编辑  收藏  举报