1 Star 1 Fork 5.3K

Dragon / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
quickstart-lite-env-setup-faqs.md 3.67 KB
一键复制 编辑 原始数据 按行查看 历史
duangavin123 提交于 2021-09-09 15:41 . update 导入OpenHarmony工程

FAQs

What should I do if garbled characters and segmentation faults occur during hb installation?

  • Symptom

    Garbled characters and segmentation faults occur during the execution of the python3 -m pip install --user ohos-build command.

  • Possible Causes

    pip is of an early version.

  • Solutions

    Upgrade pip.

    python3 -m pip install -U pip

What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?

  • Symptom

    The message "cannot import 'sysconfig' from 'distutils'" is displayed during the execution of the python3 -m pip install --user ohos-build command.

  • Possible Causes

    The distutils module is unavailable.

  • Solutions

    Install distutils.

    sudo apt-get install python3.8-distutils

What should I do if the message "module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation?

  • Symptom

    The message "module 'platform' has no attribute 'linux_distribution'" is displayed during the execution of the python3 -m pip install --user ohos-build command.

  • Possible Causes

    There is a compatibility issue of python3-pip.

  • Solutions

    Reinstall pip.

    sudo apt remove python3-pip
    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    python get-pip.py

What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?

  • Symptom

    The message "Could not find a version that satisfies the requirement ohos-build" is displayed during the execution of the python3 -m pip install --user ohos-build command.

  • Possible Causes

    The installation fails due to poor network connectivity.

  • Solutions

    1. Ensure that your computer has a good network connection. If the network connection is unstable, rectify the network fault and reinstall hb.

    2. If the network is functional, run the following commands to install hb by specifying a temporary PyPI source:

      python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ohos-build

What should I do if the message "ImportError: No module named apt_pkg" is displayed during the execution of an unidentifiable command?

  • Symptom

    The message "ImportError: No module named apt_pkg" is displayed when an unidentifiable command is executed on the Linux server.

  • Possible Causes

    There is a compatibility issue of python3-apt.

  • Solutions

    Reinstall python3-apt.

    sudo apt-get remove  python3-apt
    sudo apt-get install python3-apt
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hbu-dragon/docs.git
git@gitee.com:hbu-dragon/docs.git
hbu-dragon
docs
docs
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891