当前位置: 首页 > news >正文

服装设计以及网页设计素材优化排名

服装设计以及网页设计素材,优化排名,阿里云香港节点做的网站,自己网站建设问题文章目录 简介安装工具链获取gitee源码安装编译工具编译测试 简介 在本文中,我们将介绍如何使用命令行工具在你的设备上安装OpenHarmony操作系统。OpenHarmony是一个开源的、面向物联网(IoT)设备的操作系统,它提供了一套全面的开…

文章目录

  • 简介
  • 安装工具链
  • 获取gitee源码
  • 安装编译工具
  • 编译测试

简介

在本文中,我们将介绍如何使用命令行工具在你的设备上安装OpenHarmony操作系统。OpenHarmony是一个开源的、面向物联网(IoT)设备的操作系统,它提供了一套全面的开发框架,使得开发者可以更容易地创建和部署IoT应用。

在本次安装中,使用的电脑是基于Ubuntu22的物理机器,按照官方文档的说明,优先推荐的方式是使用 DevEco Studio 进行开发,这种方式使用Windows 做前端,Linux 虚拟机作为编译后端,对于Linux 不熟悉的新手来说比较友好,与此同时也限制了使用的环境,例如 DevEco Device Tool 目前无法在Ubuntu22 上安装成功,因为 Ubuntu22 中默认的 Python 版本是3.10,Python版本不匹配,我尝试修改 DevEco Device Tool 中的部分文件并跳过完整性检查,依然无法安装。

相比使用GUI的方式,我更习惯使用命令行进行编译,简单高效,且灵活度更高,Linux有很多的发行版本,Ubuntu 在国内普通用户使用的最多的,同时也是最受欢迎的版本,但并不是每一个人都会使用Ubuntu,想要再 Ubuntu22 或者其他Linux 系统上编译,这应该是唯一的选择,由用户自己来解决依赖的缺失问题。

安装工具链

  1. 默认情况下,Ubuntu中使用的脚本解释器是dash(终端输入ls -l /bin/sh查看链接文件指向的位置),输入如下指令选择No,需要将其替换为bash
sudo dpkg-reconfigure dash
  1. 使用如下apt-get命令安装后续操作所需的库和工具:
sudo apt-get update && sudo apt-get install binutils binutils-dev git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib gcc-arm-linux-gnueabi libc6-dev-i386 libc6-dev-amd64 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.10 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.10-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 git git-lfs
  1. 将Python3.10设置为Python与Python3的默认版本
which python3.10                                    # 查看python3.10的位置
sudo update-alternatives --install /usr/bin/python python {Python 3.10 路径} 1
sudo update-alternatives --install /usr/bin/python3 python3 {Python 3.10 路径} 1

获取gitee源码

  1. 首先需要下载gitee的repo工具:
curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o repo 
chmod a+x repo
sudo mv repo /usr/bin/
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
  1. OpenHarmony主干代码获取:
repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
  1. 在源码根目录下执行prebuilts脚本,安装编译器及二进制工具:
bash build/prebuilts_download.sh

安装编译工具

  1. 在源码根目录运行如下命令安装hb并更新至最新版本:
python3 -m pip install --user build/hb
  1. 设置环境变量:
echo "export PATH=~/.local/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc
  1. 按照官方的说法,在源码目录执行"hb help",界面打印以下信息即表示安装成功:
[OHOS INFO] ----------------------------------------------------------------------------------------------------
[OHOS INFO] usage: hb build [option]
[OHOS INFO] 
[OHOS INFO] options:
[OHOS INFO]   -h, --help            show this help message and exit
[OHOS INFO]   --target-cpu {arm,arm64,x86_64,x64}
[OHOS INFO]                         Default:''. Help:Specifies the desired cpu architecture for the build, each may support different cpu architectures, run 'hb set --all' to list product all supported cpu architectures
[OHOS INFO]   --target-os {android,ios}
[OHOS INFO]                         Default:''. Help:Specifies the desired os type for the build, each may support different os type, run 'hb set --all' to list product all supported os type
[OHOS INFO]   -p PRODUCT_NAME, --product-name PRODUCT_NAME
[OHOS INFO]                         Default:''. Help:Build a specified product. You could use this option like this: 1.'hb build --product-name rk3568@hihope' 2.'hb build --product-name rk3568'
...
  1. 下面是我尝试编译时遇到的问题,找不到Mapping
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "/home/lhq/software/OpenHarmony/build/hb/containers/status.py", line 47, in wrapper
[OHOS ERROR]     return func(*args, **kwargs)
[OHOS ERROR]   File "/home/lhq/software/OpenHarmony/build/hb/main.py", line 112, in main
[OHOS ERROR]     module = main._init_set_module()
[OHOS ERROR]   File "/home/lhq/software/OpenHarmony/build/hb/main.py", line 83, in _init_set_module
[OHOS ERROR]     from services.menu import Menu
[OHOS ERROR]   File "/home/lhq/software/OpenHarmony/build/hb/services/menu.py", line 25, in <module>
[OHOS ERROR]     from prompt_toolkit.shortcuts import run_application
[OHOS ERROR]   File "/home/lhq/.local/lib/python3.10/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
[OHOS ERROR]     from .interface import CommandLineInterface
[OHOS ERROR]   File "/home/lhq/.local/lib/python3.10/site-packages/prompt_toolkit/interface.py", line 19, in <module>
[OHOS ERROR]     from .application import Application, AbortAction
[OHOS ERROR]   File "/home/lhq/.local/lib/python3.10/site-packages/prompt_toolkit/application.py", line 8, in <module>
[OHOS ERROR]     from .key_binding.bindings.basic import load_basic_bindings
[OHOS ERROR]   File "/home/lhq/.local/lib/python3.10/site-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in <module>
[OHOS ERROR]     from prompt_toolkit.renderer import HeightIsUnknownError
[OHOS ERROR]   File "/home/lhq/.local/lib/python3.10/site-packages/prompt_toolkit/renderer.py", line 11, in <module>
[OHOS ERROR]     from prompt_toolkit.styles import Style
[OHOS ERROR]   File "/home/lhq/.local/lib/python3.10/site-packages/prompt_toolkit/styles/__init__.py", line 8, in <module>
[OHOS ERROR]     from .from_dict import *
[OHOS ERROR]   File "/home/lhq/.local/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py", line 9, in <module>
[OHOS ERROR]     from collections import Mapping
[OHOS ERROR] ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
[OHOS ERROR] 
[OHOS ERROR] Code:      0000
[OHOS ERROR] 
[OHOS ERROR] Reason:    cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
[OHOS ERROR] 
[OHOS ERROR] Solution:  no solution
[OHOS ERROR]

这是由于Python3.10中collections中已经不再包含Mapping,需要将 /home/lhq/.local/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py 中的 第9行进行替换:

from collections import Mapping      # 原有代码
from collections.abc import Mapping  # 替换后的代码

编译测试

  1. 设置编译路径并选择需要编译的目标
hb set
  • 输入后系统类型选择 small
  • 目标板选择 qemu_small_system_demo
  1. 编译
hb build
  • 输出如下信息即代表编译成功
[OHOS INFO] --------------------------------------------
[OHOS INFO] ccache summary:
[OHOS INFO] ccache version: 4.5.1
[OHOS INFO] cache hit (direct): 18
[OHOS INFO] cache hit (preprocessed): 24
[OHOS INFO] cache miss: 18
[OHOS INFO] hit rate: 70.00% 
[OHOS INFO] miss rate: 30.00% 
[OHOS INFO] Cache size (GB): 4.96 / 100.00 (4.96 %)
[OHOS INFO] ---------------------------------------------
[OHOS INFO] c targets overlap rate statistics
[OHOS INFO] subsystem           files NO.       percentage      builds NO.      percentage      overlap rate
[OHOS INFO] arkui                    178        3.9%         178        3.9%    1.00
[OHOS INFO] communication            295        6.5%         295        6.5%    1.00
[OHOS INFO] graphic                   34        0.8%          34        0.8%    1.00
[OHOS INFO] hdf                      232        5.1%         232        5.1%    1.00
[OHOS INFO] hiviewdfx                 14        0.3%          14        0.3%    1.00
[OHOS INFO] kernel                  2169        48.0%       2169        48.0%   1.00
[OHOS INFO] powermgr                   1        0.0%           1        0.0%    1.00
[OHOS INFO] security                 308        6.8%         308        6.8%    1.00
[OHOS INFO] startup                  113        2.5%         113        2.5%    1.00
[OHOS INFO] systemabilitymgr          22        0.5%          22        0.5%    1.00
[OHOS INFO] thirdparty              1119        24.7%       1119        24.7%   1.00
[OHOS INFO] window                    18        0.4%          18        0.4%    1.00
[OHOS INFO] 
[OHOS INFO] c overall build overlap rate: 1.00
[OHOS INFO] 
[OHOS INFO] 
[OHOS INFO] qemu_small_system_demo build success
[OHOS INFO] Cost time:  0:00:16
http://www.mnyf.cn/news/49972.html

相关文章:

  • php做的网站毕设会问的问题深圳海外推广
  • 中企动力设计的网站今日搜索排行榜
  • 男女同房做爰网站网上软文发稿平台
  • 网络营销做得好的产品广州网络seo公司
  • 雅虎做网站推广今天的新闻摘抄
  • 自己建设个人网站要花费多少百度网址大全旧版
  • 网站首页页面设计收录优美的图片
  • 如何在虚拟机里面做网站代理公司注册
  • unas做网站服务器免费二级域名注册申请
  • wordpress wp terms网站优化网站
  • 辽宁响应式网站建设哪家好网站排名靠前方法
  • 服务器可以做几个网站吗2024年重启核酸
  • 制作网页费用重庆百度整站优化
  • 顺德品牌网站建设拉新项目官方一手平台
  • 网站设计与网页制作正文网站制作平台
  • 通过网站做诈骗立案吗怎么做网站链接
  • 合肥网站推广 公司2022年最新新闻播报稿件
  • 网站开发的前后端是什么西安seo网站建设
  • wordpress+读取excel优化网络
  • 淄博做网站推广哪家好推广普通话宣传内容
  • 建设网站的一般过程百度新闻官网首页
  • 吉林省政府网站建设内容郑州网络公司排名
  • 太湖云建站网站建设手机优化大师官网
  • 动态网站用数据库怎么做镇江百度公司
  • 管家网站百度账号安全中心
  • 在哪几个网站里做自媒体赚钱西安百度推广电话
  • 怎么做网站劫持济南seo整站优化招商电话
  • 南宁做网站哪家好宁波seo优化外包公司
  • 荆州做网站公司建网站设计
  • wordpress DUX的文章容器ID网站功能优化