计算云更新python版本&git配置

计算云git配置

问题:在计算云上执行git clone下载gitlab或gerrit上的代码后,提示权限校验失败被拒绝
解决方案:计算云配置git
按照上面指导,重新初始化了git的域账号和域密码后,将新的ssh-rsa公钥添加到gerrit系统的ssh公钥中,再次执行git clone后即可正常下载代码。

计算云更新python版本

查看与更新linux系统python版本

查看版本

查看系统默认python版本:python --version;python -V
查看系统安装的所有python版本:ls -l /usr/bin/python*

更新版本

1.更新apt软件包下载源
vi /etc/apt/source.list, 添加如下内容:
deb http://mirrors.heds.hihonor.com/ubuntu/ bionic main restricted universe multiverse
#deb-src http://mirrors.heds.hihonor.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.heds.hihonor.com/ubuntu/ bionic-security main restricted universe multiverse
#deb-src http://mirrors.heds.hihonor.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.heds.hihonor.com/ubuntu/ bionic-updates main restricted universe multiverse
#deb-src http://mirrors.heds.hihonor.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.heds.hihonor.com/ubuntu/ bionic-backports main restricted universe multiverse
#deb-src http://mirrors.heds.hihonor.com/ubuntu/ bionic-backports main restricted universe multiverse
2.检查更新
apt update
3.安装python指定版本
apt install python3.8
4.设置默认版本,优先级为1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
若需要保留原版本使用,这里将原来的python3.6(示例)安装为/usr/bin/python3的备选版本,优先级为2:
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
切换python3系统默认版本:
sudo update-alternatives --config python3

apt介绍

软件包管理工具 apt 详解(包含常用 apt 命令介绍)

  • 14
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值