Ubuntu食用相关

Q:执行 yarn install 出错 Yarn install command error No such file or directory: ‘install’

1
2
3
4
5
6
sudo apt remove cmdtest
sudo apt remove yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install yarn

Q:Debian11 服务器系统默认不存在 sudo 命令的解决办法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
apt-get install vim
vim /etc/apt/sources.list

#!编辑注释所有,添加以下
deb http://mirrors.aliyun.com/debian/ bullseye main contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main contrib
deb http://mirrors.aliyun.com/debian/ bullseye-updates main contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main contrib
deb http://mirrors.aliyun.com/debian/ bullseye-proposed-updates main contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-proposed-updates main contrib

apt-get update
apt-get install sudo

Q:安装 Nodejs

1
2
3
4
5
6
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v

#!卸载如下
sudo apt-get remove nodejs

Q:食用 yum 出现 except KeyboardInterrupt, e:或 except OSError,

1
2
3
4
5
6
7
8
whereis python
#修改yum配置文件,将python版本指向以前的旧版本
# vi /usr/bin/yum
#!/usr/bin/python2.7

#修改urlgrabber-ext-down文件,更改python版本
# vi /usr/libexec/urlgrabber-ext-down
#!/usr/bin/python2.7
作者

Catooilg

发布于

2022-01-05

更新于

2023-02-05

许可协议

评论