openharmony 鸿蒙 quickstart-pkg-common-hberr

2022-12-05 浏览 (691)

Fixing hb Installation Errors

Garbled characters and segmentation faults occur during hb installation

  • Symptom

    During the execution of python3 -m pip install --user ohos-build, garbled characters and segmentation faults occur..

  • Possible Causes

    The pip version does not meet requirements.

  • Solution

    Run the following command to upgrade pip:

    python3 -m pip install -U pip
    

"cannot import 'sysconfig' from 'distutils'" is displayed during hb installation

  • Symptom

    During the execution of python3 -m pip install --user ohos-build, the following information is displayed:
    cannot import 'sysconfig' from 'distutils'

  • Possible Causes

    The distutils module is unavailable.

  • Solution

    Run the following command to install distutils:

    sudo apt-get install python3.8-distutils
    

"module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation

  • Symptom

    During the execution of python3 -m pip install --user ohos-build, the following information is displayed:
    module 'platform' has no attribute 'linux_distribution'

  • Possible Causes

    There is a compatibility issue of python3-pip.

  • Solution

    Reinstall pip.

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

"Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation

  • Symptom

    During the execution of python3 -m pip install --user ohos-build, the following information is displayed:
    Could not find a version that satisfies the requirement ohos-build

  • Possible Causes

    The installation fails due to poor network connectivity.

  • Solution

    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 command to install hb by specifying a temporary PyPI source:

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

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Getting Started

harmony 鸿蒙Build Form Factors

harmony 鸿蒙Getting Started with the Standard System with Hi3516 (IDE Mode)

harmony 鸿蒙Getting Started with the Standard System with Hi3516 (CLI Mode)

harmony 鸿蒙Hi3516 Development Board

harmony 鸿蒙Hi3861 Development Board

harmony 鸿蒙RK3568 Development Board

harmony 鸿蒙Building Source Code

harmony 鸿蒙Burning an Image

harmony 鸿蒙Writing a Hello World Program

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/87c22873ce184cf7b60edb75419b02de