https://blog.csdn.net/MoonCity0910/article/details/135567100 清华源
执行命令如下命令,确认输出的结果末尾是bash,如果输出结果的末尾是dash,请根据步骤二,将Ubuntu Shell的环境修改为bash。
打开终端工具,执行如下命令,执行以后需要输入密码,然后选择No,就可以将Ubuntu Shell由dash修改为bash。
sudo dpkg-reconfigure dash
在下载好的文件(sources.list)所在的位置开启一个终端窗口,执行下列命令。 分三步执行
sudo cp /etc/apt/sources.list /etc/apt/source.list.bak
sudo mv -f sources.list /etc/apt/
sudo apt update
需要分两步进行安装
sudo apt-get install binutils binutils-dev git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby genext2fs device-tree-compiler make libffi-dev e2fsprogs pkg-config perl openssl libssl-dev libelf-dev libdwarf-dev u-boot-tools mtd-utils cpio doxygen liblz4-tool openjdk-8-jre gcc g++ texinfo dosfstools mtools default-jre default-jdk libncurses5 apt-utils wget scons python3.8-distutils tar rsync git-core libxml2-dev lib32z-dev grsync xxd libglib2.0-dev libpixman-1-dev kmod jfsutils reiserfsprogs xfsprogs squashfs-tools pcmciautils quota ppp libtinfo-dev libtinfo5 libncurses5-dev libncursesw5 libstdc++6 gcc-arm-none-eabi vim ssh locales libxinerama-dev libxcursor-dev libxrandr-dev libxi-dev
sudo apt-get install gcc-arm-linux-gnueabi gcc-9-arm-linux-gnueabi
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
python --version
mkdir ~/.pip
pip3 config set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple
pip3 config set global.trusted-host mirrors.huaweicloud.com
pip3 config set global.timeout 120
sudo apt install ssh net-tools tree vim
sudo apt install git-lfs
wget https://gitee.com/oschina/repo/raw/fork_flow/repo-py3
sudo mv repo-py3 /usr/local/bin/repo
sudo chmod a+x /usr/local/bin/repo
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
git config --global user.email "2018069031@.com"
git config --global user.name "mubai"
git config --global credential.helper store
git config --global --add safe.directory "*"
mkdir -p ~/openharmony/4.0
cd ~/openharmony/4.0
repo init -u https://gitee.com/openharmony/manifest -b OpenHarmony-4.0-Release --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
git config --global user.email "2018069031@.com"
git config --global user.name "mubai"
git config --global credential.helper store
git config --global --add safe.directory "*"
ssh-keygen -t rsa -C "2018069031@.com"
/.ssh/id_rsa
mkdir ~/bin
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o ~/bin/repo
chmod a+x ~/bin/repo
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
vim ~/.bashrc # 编辑环境变量
export PATH=~/bin:$PATH # 在环境变量的最后添加一行repo路径信息
source ~/.bashrc # 应用环境变量
mkdir -p ~/openharmony
cd ~/openharmony
repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
bash build/prebuilts_download.sh
vim ~/.bashrc
export PATH=~/.local/bin:$PATH
source ~/.bashrc
python3 -m pip uninstall ohos-build
python3 -m pip install --user build/hb
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。