[software development] 基于Deepin 23搭建 OpenHarmony 开发环境
Tofloor
poster avatar
暮成雪
deepin
15 hours ago
Author

1、前情提要

2、软件准备

https://device.harmonyos.com/cn/develop/ide#download

image.png

文件校验

image.png

解压并安装文件

unzip devicetool-linux-tool-4.0.0.400.zip

sudo ./devicetool-linux-tool-4.0.0.400.shh

image.png

image.png

如遇到报错:

E: 无法定位软件包 python-venv
2023-09-27 12:10:08 - ERROR - python-venv install failed.

解决:

sudo apt-get install python3-venv

使用清华apt源安装python 3.8

S-PC:~$ cat /etc/apt/sources.list.d/tuna.mirrors.list
#清华国内软件源 gedit /etc/apt/sources.list
#https://mirrors.tuna.tsinghua.edu.cn/help/debian/

默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware

deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

#sudo apt clean all

#sudo apt update

如果更新时遇到缺少公钥问题公钥时,通过如下方法添加公钥(--recv-kes后跟随的数值码由具体update报错提示提供 ***,缺少那些就执行那些)

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6E*******31

Reply Favorite View the author
All Replies
暮成雪
deepin
15 hours ago
#1

以前的草稿,忘记写到那儿了,凑合先发了吧

Reply View the author
mozixun
Moderator
15 hours ago
#2

这样混源操作建议将开发环境打包成Podman/Docker环境吧, 别混源真混炸了(

Reply View the author
剑风澜
deepin
14 hours ago
#3

那个......deepin的公钥上哪找?😂

Reply View the author
chmod700
deepin
12 hours ago
#4

混源勇士我都佩服,哪天依赖炸了系统崩了记得不要哭

Reply View the author
mozixun
Moderator
12 hours ago
#5
chmod700

混源勇士我都佩服,哪天依赖炸了系统崩了记得不要哭

容器混源问题不大,我的deepin v25编译Scribus的podman容器从debian12偷了一大堆包

炸了反正再开一个

Reply View the author
sammy-621
deepin
9 minutes ago
#6

华为为啥就不在Linux上整个IDE?我一直想不明白

Reply View the author