未实名验证无访问或操作权限
返回上一页不能发帖过快!
返回上一页上传文件错误!
返回上一页1#
=========================================================
我的机器:
suo@ubuntu:~/Desktop$ cat /proc/version
Linux version 5.15.0-91-generic (buildd@lcy02-amd64-061) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #101~20.04.1-Ubuntu SMP Thu Nov 16 14:22:28 UTC 2023
ubuntu 20.4 最小化安装即可。因为repo基于python,所以先要保证python正确安装。我的版本为:
suo@ubuntu:~/Desktop$ python3 --version
Python 3.8.2
以下操作,若无特别说明,默认为root登录。
-1.注册https://gitee.com/login 账号
0.确认linux空余可用磁盘空间超过120G.
终端命令为: df -BG
1.确认linux的版本以及内核版本。终端命令为:cat /proc/version 或者 uname -a 或者uname -r
2.安装gcc,终端命令为:apt install gcc
2.1确认gcc版本,终端命令为: gcc --version
3.安装g++,终端命令为:apt install g++
3.1确认g++版本,终端命令为: g++ --version
4.安装git 终端命令为:apt install git
4.1 确认git的版本 git --version
4.2 配置git
git config --global user.name "****"
git config --global user.email "****@qq.com"
git config --global credential.helper store
4.3 在终端输入git config --list 确认git配置
4.4 生成SSH密钥,并添加到网站https://gitee.com(用那台机器下载编译代码,就用那台机器生成)
参考:https://help.gitee.com/base/account/SSH%E5%85%AC%E9%92%A5%E8%AE%BE%E7%BD%AE
并注册到https://gitee.com
4.5使用pwd命令查看当前目录。在当前目录下创建一个目录hm。终端命令为 mkdir hm。改变当前工作目录为hm.
4.6 安装git-repo ,终端命令为:snap install git-repo
4.6.1 重启linux
4.7 使用gedit ~/.bashrc 编辑环境变量,在文件末尾加入一行,以设置repo的源:
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo' 退出,并保存。
4.7.1 source ~/.bashrc 修改环境变量之后立即生效。
4.7.2 echo $REPO_URL 确认环境变量修改成功。
4.7.3 安装curl 终端命令为:apt install curl
4.7.4 确认目录/usr/local/bin/ 是否存在,如果不存在,手动创建即可。
4.7.5 运行命令:curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > /usr/local/bin/repo
4.7.6 修改文件repo的执行权限:chmod 777 /usr/local/bin/repo
4.7.7 确认python3的安装,终端输入命令:whereis python3
4.7.7.1 创建软连接 sudo ln /usr/bin/python3 /usr/bin/python
5. 以普通用户登录执行 git clone https://gitee.com/null_628_5802/mhget -b MHBase-3.0-3.1-MR2-Release
5.1 以root用户登录,执行:python3 mhget.py hi_a55_mhconf.json
若提示:unable to access 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/': server certificate verification failed. CAfile: none CRLfile: none 在终端执行如下命令:
apt install ca-certificates --reinstall
5.1.1 执行:python3 mhget.py hi_a55_mhconf.json
5.1.2 开始拉代码.
repo has been initialized in /home/suo/hm/mhget/src
Enable color display in this user account (y/N)? y