本小节介绍开发所需 Ubuntu 环境的搭建方法。
系统要求:
Ubuntu 系统要求:Ubuntu18.04~21.10 版本。推荐使用 20.04 版本,内存 16GB 及以上,硬盘 100GB 及以上。
Ubuntu 系统的用户名不能包含中文字符。
建议 Ubuntu 和 Windows 系统上安装的 DevEco Device Tool 为最新版本,且版本号需相同。操作步骤:
1 将 Ubuntu Shell 环境修改为 bash。执行如下命令,确认输出结果为 bash。
ls -l /bin/sh
2 如果输出结果不是 bash,将 Ubuntu shell 修改为 bash。打开终端工具,执行如下命令,输入密码,然后选择 No,将 Ubuntu shell 由 dash 修改为 bash。
sudo dpkg-reconfigure dash
3 下载 DevEco Device Tool 最新 Linux 版本软件包。在网盘资料“03_【iTOP-RK3568 开发板】指南教程\07_OpenHarmony 系统开发配套资料\01_第二期视频配套资料\05_优化开发流程-搭建 windows 开发环境\01_DevEco Device Tool 4.0 Release\Linux 版本”目录下下载。如下图所示:
4 解压 DevEco Device Tool 软件包并对解压后的文件夹进行赋权。进入 DevEco Device Tool 软件包目录,执行如下命令解压软件包,其中 devicetool-linux-tool-{Version}.zip 为软件包名称,请根据实际进行修改。
unzip devicetool-linux-tool-{Version}.zip
5 进 入 解 压 后 的 文 件 夹 , 执 行 如 下 命 令 , 赋 予 安 装 文 件 可 执 行 权 限 , 其 中devicetool-linux-tool-{Version}.sh 请根据实际进行修改。
chmod u+x devicetool-linux-tool-{Version}.sh
6 执行如下命令,安装 DevEco Device Tool,其中 devicetool-linux-tool-{Version}.sh 请根据实际进行修改。
sudo ./devicetool-linux-tool-{Version}.sh
7 在用户协议和隐私声明签署界面,请详细阅读用户协议和隐私声明,需签署同意用户协议和隐私声明才能进行下一步的安装,可通过键盘的上下按键进行选择。
8 安装完成后,当界面输出“DevEco Device Tool successfully installed.”时,表示 DevEco DeviceTool 安装成功。